A Host header must be present for http_update_host() to success.
htx_add_header(htx, ist("Host"), IST_NULL) was used but this is not a
good idea from a semantic point of view. It also tries to make a memcpy
with a len of 0, which is unrequired.
Use an ist("h") instead as a placeholder value.
This patch fixes bug #1439.
sl->info.req.meth = meth;
/* Add Host Header from URL */
- if (!htx_add_header(htx, ist("Host"), IST_NULL))
+ if (!htx_add_header(htx, ist("Host"), ist("h")))
goto error;
if (!http_update_host(htx, sl, url))
goto error;