packages/net/haproxy/patches/005-BUG-MINOR-mux-h1-Dont-return-the-empty-chunk-on-HEAD-responses.patch
Christian Lachner 92b5742300 haproxy: Update HAProxy to v2.0.1
- Update haproxy download URL and hash
- Add new patches

Signed-off-by: Christian Lachner <gladiac@gmail.com>
2019-07-01 20:45:28 +02:00

27 lines
1 KiB
Diff

commit 33d58b51e0f1bf68603aa86c9125ae75d6964454
Author: Christopher Faulet <cfaulet@haproxy.com>
Date: Mon Jul 1 16:17:30 2019 +0200
BUG/MINOR: mux-h1: Don't return the empty chunk on HEAD responses
HEAD responses must not have any body payload. But, because of a bug, for chunk
reponses, the empty chunk was always added.
This patch fixes the Github issue #146. It must be backported to 2.0 and 1.9.
(cherry picked from commit b8fc304e8f996f0d9835e4d6524ef8961d3be076)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/src/mux_h1.c b/src/mux_h1.c
index e7d769b4..37cc8252 100644
--- a/src/mux_h1.c
+++ b/src/mux_h1.c
@@ -1682,6 +1682,8 @@ static size_t h1_process_output(struct h1c *h1c, struct buffer *buf, size_t coun
h1m->flags |= (H1_MF_NO_PHDR|H1_MF_CLEAN_CONN_HDR);
h1s->flags &= ~H1S_F_HAVE_O_CONN;
}
+ else if ((h1m->flags & H1_MF_RESP) && h1s->meth == HTTP_METH_HEAD)
+ h1m->state = H1_MSG_DONE;
else
h1m->state = H1_MSG_DATA;
break;