mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
MINOR: httpclient: add the EOH when no headers where provided
httpclient_req_gen() now adds the end of headers block when no header was provided, which avoid adding it manually.
This commit is contained in:
parent
a8018eb470
commit
79a3478c24
@ -283,8 +283,13 @@ int httpclient_req_gen(struct httpclient *hc, const struct ist url, enum http_me
|
||||
goto error;
|
||||
|
||||
/* add the headers and EOH */
|
||||
if (hdrs && !htx_add_all_headers(htx, hdrs))
|
||||
goto error;
|
||||
if (hdrs) {
|
||||
if (!htx_add_all_headers(htx, hdrs))
|
||||
goto error;
|
||||
} else {
|
||||
if (!htx_add_endof(htx, HTX_BLK_EOH))
|
||||
goto error;
|
||||
}
|
||||
|
||||
htx->flags |= HTX_FL_EOM;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user