mirror of
https://github.com/nginx/nginx.git
synced 2025-07-21 19:56:23 +08:00
HTTP: do not allow status line to end with bare LF
This is consistent with llhttp.
This commit is contained in:
parent
bd37faff72
commit
7032a60fa0
@ -732,10 +732,6 @@ ngx_http_parse_request_line(ngx_http_request_t *r, ngx_buf_t *b)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ch == LF) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ch == ' ') {
|
if (ch == ' ') {
|
||||||
state = sw_spaces_after_digit;
|
state = sw_spaces_after_digit;
|
||||||
break;
|
break;
|
||||||
@ -1896,8 +1892,6 @@ ngx_http_parse_status_line(ngx_http_request_t *r, ngx_buf_t *b,
|
|||||||
case CR:
|
case CR:
|
||||||
state = sw_almost_done;
|
state = sw_almost_done;
|
||||||
break;
|
break;
|
||||||
case LF:
|
|
||||||
goto done;
|
|
||||||
default:
|
default:
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
@ -1910,7 +1904,6 @@ ngx_http_parse_status_line(ngx_http_request_t *r, ngx_buf_t *b,
|
|||||||
state = sw_almost_done;
|
state = sw_almost_done;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case LF:
|
|
||||||
goto done;
|
goto done;
|
||||||
default:
|
default:
|
||||||
if (ch < 0x20 || ch == 0x7f) {
|
if (ch < 0x20 || ch == 0x7f) {
|
||||||
|
Loading…
Reference in New Issue
Block a user