]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[CLEANUP] http_server_error() must not purge a previous pending response
authorWilly Tarreau <w@1wt.eu>
Fri, 22 Jan 2010 13:17:47 +0000 (14:17 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 28 Jan 2010 22:16:50 +0000 (23:16 +0100)
This can cause parts of responses to be truncated in case of
pipelined requests if the second request generates an error
before the first request is completely flushed.

(cherry picked from commit d5fd51c75be6479539228f84377622a986b23be2)

src/proto_http.c

index 36d73cef53d6144ea9a52e16b1c3cd5c4e469320..cc2af32f2efce9f95c1da6b90c045e5755ed3a5a 100644 (file)
@@ -532,8 +532,8 @@ int http_find_header(const char *name,
 static void http_server_error(struct session *t, struct stream_interface *si,
                              int err, int finst, int status, const struct chunk *msg)
 {
+       buffer_abort(si->ob);
        buffer_erase(si->ob);
-       buffer_erase(si->ib);
        buffer_write_ena(si->ib);
        if (status > 0 && msg) {
                t->txn.status = status;