[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
This commit is contained in:
parent
2d91475828
commit
41b50cfa71
|
@ -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…
Reference in New Issue