mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-28 14:21:00 +01:00
MINOR: Do not forward the header "Expect: 100-continue" when the option http-buffer-request is set
When the option "http-buffer-request" is set, HAProxy send itself the "HTTP/1.1 100 Continue" response in order to retrieve the post content. When HAProxy forward the request, it send the body directly after the headers. The header "Expect: 100-continue" was sent with the headers. This header is useless because the body will be sent in all cases, and the server reponse is not removed by haproxy. This patch removes the header "Expect: 100-continue" if HAProxy sent it itself.
This commit is contained in:
parent
c1edafe4a9
commit
43ad11dc75
@ -4914,6 +4914,7 @@ int http_wait_for_request_body(struct stream *s, struct channel *req, int an_bit
|
||||
if (http_find_header2("Expect", 6, req->buf->p, &txn->hdr_idx, &ctx) &&
|
||||
unlikely(ctx.vlen == 12 && strncasecmp(ctx.line+ctx.val, "100-continue", 12) == 0)) {
|
||||
bo_inject(&s->res, http_100_chunk.str, http_100_chunk.len);
|
||||
http_remove_header2(&txn->req, &txn->hdr_idx, &ctx);
|
||||
}
|
||||
}
|
||||
msg->msg_state = HTTP_MSG_100_SENT;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user