[mod_proxy] use case-insensitive comparision to filter headers, send Connection: Close to backend (fixes #421)
From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3093 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
parent
dde7bea99a
commit
f56fe331e5
1
NEWS
1
NEWS
|
@ -23,6 +23,7 @@ NEWS
|
|||
* [mod_cgi] consolidate CGI cleanup code
|
||||
* [mod_cgi] simplify mod_cgi_handle_subrequest()
|
||||
* [mod_cgi] kill CGI if fail to write request body
|
||||
* [mod_proxy] use case-insensitive comparision to filter headers, send Connection: Close to backend (fixes #421)
|
||||
|
||||
- 1.4.39 - 2016-01-02
|
||||
* [core] fix memset_s call (fixes #2698)
|
||||
|
|
|
@ -490,8 +490,8 @@ static int proxy_create_env(server *srv, handler_ctx *hctx) {
|
|||
ds = (data_string *)con->request.headers->data[i];
|
||||
|
||||
if (!buffer_is_empty(ds->value) && !buffer_is_empty(ds->key)) {
|
||||
if (buffer_is_equal_string(ds->key, CONST_STR_LEN("Connection"))) continue;
|
||||
if (buffer_is_equal_string(ds->key, CONST_STR_LEN("Proxy-Connection"))) continue;
|
||||
if (buffer_is_equal_caseless_string(ds->key, CONST_STR_LEN("Connection"))) continue;
|
||||
if (buffer_is_equal_caseless_string(ds->key, CONST_STR_LEN("Proxy-Connection"))) continue;
|
||||
|
||||
buffer_append_string_buffer(b, ds->key);
|
||||
buffer_append_string_len(b, CONST_STR_LEN(": "));
|
||||
|
@ -500,7 +500,7 @@ static int proxy_create_env(server *srv, handler_ctx *hctx) {
|
|||
}
|
||||
}
|
||||
|
||||
buffer_append_string_len(b, CONST_STR_LEN("\r\n"));
|
||||
buffer_append_string_len(b, CONST_STR_LEN("Connection: close\r\n\r\n"));
|
||||
|
||||
chunkqueue_append_buffer(hctx->wb, b);
|
||||
buffer_free(b);
|
||||
|
|
Loading…
Reference in New Issue