mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-05 07:05:07 +02: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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user