mirror of
https://github.com/nginx/nginx.git
synced 2026-05-28 04:12:47 -04:00
Upstream: reset parsing state after invalid status line
Previously, it was possible to start parsing headers with a wrong parsing state after status line was not recognized, as a fallback used in the scgi and uwsgi modules. Reported by Leo Lin.
This commit is contained in:
parent
54b7945961
commit
baef7fdac2
2 changed files with 2 additions and 0 deletions
|
|
@ -1036,6 +1036,7 @@ ngx_http_scgi_process_status_line(ngx_http_request_t *r)
|
|||
|
||||
if (rc == NGX_ERROR) {
|
||||
u->process_header = ngx_http_scgi_process_header;
|
||||
r->state = 0;
|
||||
return ngx_http_scgi_process_header(r);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1275,6 +1275,7 @@ ngx_http_uwsgi_process_status_line(ngx_http_request_t *r)
|
|||
|
||||
if (rc == NGX_ERROR) {
|
||||
u->process_header = ngx_http_uwsgi_process_header;
|
||||
r->state = 0;
|
||||
return ngx_http_uwsgi_process_header(r);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue