From: Nenad Merdanovic Date: Mon, 25 Apr 2016 23:39:02 +0000 (+0200) Subject: BUG/MINOR: log: fix a typo that would cause %HP to log X-Git-Tag: v1.7-dev3~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=54e439f0b46f3cb5cd59e1f21864b1790e6d340b;p=thirdparty%2Fhaproxy.git BUG/MINOR: log: fix a typo that would cause %HP to log Typo was introduced in 57bc891 ("BUG/MEDIUM: log: fix risk of segfault when logging HTTP fields in TCP mode") which inverted the condition in the test and caused to be logged when using %HP. Signed-off-by: Nenad Merdanovic --- diff --git a/src/log.c b/src/log.c index dffef54150..2d02247042 100644 --- a/src/log.c +++ b/src/log.c @@ -1917,7 +1917,7 @@ int build_logline(struct stream *s, char *dst, size_t maxsize, struct list *list while (spc < end && *spc != '?' && !HTTP_IS_SPHT(*spc)) spc++; - if (!txn || txn->uri || nspaces == 0) { + if (!txn || !txn->uri || nspaces == 0) { chunk.str = ""; chunk.len = strlen(""); } else {