mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-03-04 06:31:13 +01:00
BUG/MINOR: httpclient: fix Host header
THe http_update_update_host function takes an URL and extract the domain to use as a host header. However it only update an existing host header and does not create one. This patch add an empty host header so the function can update it.
This commit is contained in:
parent
211c9679c8
commit
4463b17fe3
@ -276,6 +276,8 @@ int httpclient_req_gen(struct httpclient *hc, const struct ist url, enum http_me
|
||||
sl->info.req.meth = meth;
|
||||
|
||||
/* Add Host Header from URL */
|
||||
if (!htx_add_header(htx, ist("Host"), IST_NULL))
|
||||
goto error;
|
||||
if (!http_update_host(htx, sl, url))
|
||||
goto error;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user