mirror of
https://github.com/nginx/nginx.git
synced 2025-07-21 11:46:20 +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;
|
||||
}
|
||||
|
||||
if (ch == LF) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (ch == ' ') {
|
||||
state = sw_spaces_after_digit;
|
||||
break;
|
||||
@ -1896,8 +1892,6 @@ ngx_http_parse_status_line(ngx_http_request_t *r, ngx_buf_t *b,
|
||||
case CR:
|
||||
state = sw_almost_done;
|
||||
break;
|
||||
case LF:
|
||||
goto done;
|
||||
default:
|
||||
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;
|
||||
|
||||
break;
|
||||
case LF:
|
||||
goto done;
|
||||
default:
|
||||
if (ch < 0x20 || ch == 0x7f) {
|
||||
|
Loading…
Reference in New Issue
Block a user