Browse Source

[core] fix 301 -> 302 overwrite with Location (fixes #2918)

fix bug resulting in status code being overwritten from 301 to 302 if
Location response header is returned by a backend which is not mod_proxy

(regression in lighttpd 1.4.51)

(thx shochodev)

x-ref:
  "lighttpd is not obeying the http status code sent by our application (302 sent by lighttpd when 301 is sent by application)"
  https://redmine.lighttpd.net/issues/2918
personal/stbuehler/fix-fdevent
Glenn Strauss 3 years ago
parent
commit
41b50cfa71
  1. 1
      src/http-header-glue.c

1
src/http-header-glue.c

@ -925,6 +925,7 @@ static int http_response_process_headers(server *srv, connection *con, http_resp
status = strtol(value, NULL, 10);
if (status >= 100 && status < 1000) {
con->http_status = status;
status_is_set = 1;
} else {
con->http_status = 502;
con->mode = DIRECT;

Loading…
Cancel
Save