diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2021-04-02 00:43:03 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2021-04-05 13:24:51 -0400 |
commit | 82abd16dd77f991a1167342e4f00a234a7678e3a (patch) | |
tree | 3430d619e411cd789cf096dfd7320243dad037a6 /src/mod_proxy.c | |
parent | 20a68d7301953fca660b46598098a32146fd8361 (diff) | |
download | lighttpd-git-82abd16dd77f991a1167342e4f00a234a7678e3a.tar.gz |
[mod_proxy] send HTTP/1.0 to backend if no Host
send HTTP/1.0 request to backend if no Host header sent with request
(If Host header is present with an HTTP/1.0 request from client, then
lighttpd can still make an HTTP/1.1 request to backends)
Diffstat (limited to 'src/mod_proxy.c')
-rw-r--r-- | src/mod_proxy.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mod_proxy.c b/src/mod_proxy.c index 61ad11ec..90b0baee 100644 --- a/src/mod_proxy.c +++ b/src/mod_proxy.c @@ -877,6 +877,9 @@ static handler_t proxy_create_env(gw_handler_ctx *gwhctx) { size_t alen = buffer_string_length(r->http_host); http_header_remap_host(b, buffer_string_length(b) - alen, &hctx->conf.header, 1, alen); } + } else { + /* no Host header available; must send HTTP/1.0 request */ + b->ptr[b->used-2] = '0'; /*(overwrite end of request line)*/ } /* "Forwarded" and legacy X- headers */ |