diff --git a/src/log.c b/src/log.c index 5204de2b2..4f3c7c710 100644 --- a/src/log.c +++ b/src/log.c @@ -2065,9 +2065,9 @@ int sess_build_logline(struct session *sess, struct stream *s, char *dst, size_t case LOG_FMT_EXPR: // sample expression, may be request or response key = NULL; - if (tmp->options & LOG_OPT_REQ_CAP && s) + if (tmp->options & LOG_OPT_REQ_CAP) key = sample_fetch_as_type(be, sess, s, SMP_OPT_DIR_REQ|SMP_OPT_FINAL, tmp->expr, SMP_T_STR); - if (!key && (tmp->options & LOG_OPT_RES_CAP) && s) + if (!key && (tmp->options & LOG_OPT_RES_CAP)) key = sample_fetch_as_type(be, sess, s, SMP_OPT_DIR_RES|SMP_OPT_FINAL, tmp->expr, SMP_T_STR); if (tmp->options & LOG_OPT_HTTP) ret = lf_encode_chunk(tmplog, dst + maxsize,