Browse Source

[mod_proxy] accept LF delimited headers, not just CRLF (fixes #2594)

From: Glenn Strauss <gstrauss@gluelogic.com>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3126 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/heads/lighttpd-1.4.x
Glenn Strauss 6 years ago
committed by Stefan Bühler
parent
commit
0aa2ea74e3
  1. 1
      NEWS
  2. 6
      src/mod_proxy.c

1
NEWS

@ -50,6 +50,7 @@ NEWS
* validate return values from strtol, strtoul (fixes #2564)
* [mod_ssi] Add SSI vars SCRIPT_{URI,URL} and REQUEST_SCHEME (fixes #2721)
* [config] warn if server.upload-dirs has non-existent dirs (fixes #2508)
* [mod_proxy] accept LF delimited headers, not just CRLF (fixes #2594)
- 1.4.39 - 2016-01-02
* [core] fix memset_s call (fixes #2698)

6
src/mod_proxy.c

@ -532,18 +532,18 @@ static int proxy_response_parse(server *srv, connection *con, plugin_data *p, bu
UNUSED(srv);
/* \r\n -> \0\0 */
/* [\r]\n -> [\0]\0 */
buffer_copy_buffer(p->parse_response, in);
for (s = p->parse_response->ptr; NULL != (ns = strstr(s, "\r\n")); s = ns + 2) {
for (s = p->parse_response->ptr; NULL != (ns = strchr(s, '\n')); s = ns + 1) {
char *key, *value;
int key_len;
data_string *ds;
int copy_header;
ns[0] = '\0';
ns[1] = '\0';
if (s != ns && ns[-1] == '\r') ns[-1] = '\0';
if (-1 == http_response_status) {
/* The first line of a Response message is the Status-Line */

Loading…
Cancel
Save