]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: http: log 407 in case of proxy auth
authorWilly Tarreau <w@1wt.eu>
Mon, 28 Apr 2014 14:59:15 +0000 (16:59 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 28 Apr 2014 15:24:42 +0000 (17:24 +0200)
Commit 844a7e7 ("[MEDIUM] http: add support for proxy authentication")
merged in v1.4-rc1 added the ability to emit a status code 407 in auth
responses, but forgot to set the same status in the logs, which still
contain 401.

The bug is harmless, no backport is needed.

src/proto_http.c

index 27693ac083ee7085d6e27dc8bcb55fa6ec8ea4c0..6f6bb0d14aad520f3ea68dc516c4ead6d1a6df9e 100644 (file)
@@ -3953,7 +3953,7 @@ int http_process_req_common(struct session *s, struct channel *req, int an_bit,
                        realm = (objt_applet(s->target) == &http_stats_applet) ? STATS_DEFAULT_REALM : px->id;
 
                chunk_printf(&trash, (txn->flags & TX_USE_PX_CONN) ? HTTP_407_fmt : HTTP_401_fmt, realm);
-               txn->status = 401;
+               txn->status = (txn->flags & TX_USE_PX_CONN) ? 407 : 401;
                stream_int_retnclose(req->prod, &trash);
                /* on 401 we still count one error, because normal browsing
                 * won't significantly increase the counter but brute force