]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: http: message parser must ignore HTTP_MSG_ERROR
authorWilly Tarreau <w@1wt.eu>
Mon, 16 Apr 2012 12:51:55 +0000 (14:51 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 30 Apr 2012 09:51:59 +0000 (11:51 +0200)
The issue only happens when DEBUG_FULL is enabled, which causes
http_msg_analyzer() to complain if it's called twice with an invalid
message, for instance because of two consecutive ACLs using req_proto_http.

The code is commented out when DEBUG_FULL is disabled, so this is not a bug,
just an annoyance for the developer.

src/proto_http.c

index ae300473eb25da4f06ee9e84ba8ece18889ab87a..22623c058ab092acb7ccc0d3a1a0b8e029612925 100644 (file)
@@ -1569,6 +1569,11 @@ void http_msg_analyzer(struct buffer *buf, struct http_msg *msg, struct hdr_idx
                msg->sol = buf->data + msg->som;
                msg->msg_state = HTTP_MSG_BODY;
                return;
+
+       case HTTP_MSG_ERROR:
+               /* this may only happen if we call http_msg_analyser() twice with an error */
+               break;
+
 #ifdef DEBUG_FULL
        default:
                fprintf(stderr, "FIXME !!!! impossible state at %s:%d = %d\n", __FILE__, __LINE__, state);