From: Willy Tarreau Date: Tue, 4 Dec 2012 09:39:01 +0000 (+0100) Subject: BUG/MINOR: http: don't log a 503 on client errors while waiting for requests X-Git-Tag: v1.5-dev15~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc979f24929ad5352832730954c83ba47afe24cc;p=thirdparty%2Fhaproxy.git BUG/MINOR: http: don't log a 503 on client errors while waiting for requests If a client aborts a request with an error (typically a TCP reset), we must log a 400. Till now we did not set the status nor close the stream interface, causing the request to attempt to be forwarded and logging a 503. Should be backported to 1.4 which is affected as well. --- diff --git a/src/proto_http.c b/src/proto_http.c index 0e51c089f4..54850d7829 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -2334,6 +2334,8 @@ int http_wait_for_request(struct session *s, struct channel *req, int an_bit) session_inc_http_err_ctr(s); } + txn->status = 400; + stream_int_retnclose(req->prod, NULL); msg->msg_state = HTTP_MSG_ERROR; req->analysers = 0;