]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: httpclient: allow to replace the host header
authorWilliam Lallemand <wlallemand@haproxy.org>
Wed, 24 Nov 2021 14:38:17 +0000 (15:38 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 24 Nov 2021 14:44:36 +0000 (15:44 +0100)
commitf03b53c81d52344c29d7a5434ac32f3127cebf75
tree1da376f5ba7cadfd4525ffe799c4ef655e6dee3f
parent27f88a9059d0e343d82a0319b622e0f4248b0bb8
BUG/MINOR: httpclient: allow to replace the host header

This patch allows to replace the host header generated by the
httpclient instead of adding a new one, resulting in the server replying
an error 400.

The host header is now generated from the uri only if it wasn't found in
the list of headers.

Also add a new request in the VTC file to test this.

This patch must be backported in 2.5.
reg-tests/lua/lua_httpclient.lua
reg-tests/lua/lua_httpclient.vtc
src/http_client.c