projects
/
haproxy-2.5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
211c967
)
BUG/MINOR: httpclient: fix Host header
author
William Lallemand
<wlallemand@haproxy.org>
Tue, 24 Aug 2021 15:53:03 +0000
(17:53 +0200)
committer
William Lallemand
<wlallemand@haproxy.org>
Tue, 24 Aug 2021 15:53:03 +0000
(17:53 +0200)
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.
src/http_client.c
patch
|
blob
|
history
diff --git
a/src/http_client.c
b/src/http_client.c
index
fad3368
..
f6621a6
100644
(file)
--- a/
src/http_client.c
+++ b/
src/http_client.c
@@
-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;