mirror of
https://github.com/nginx/nginx.git
synced 2025-07-22 12:26:21 +08:00
HTTP/3: Do not allow invalid pseudo-header fields
RFC9114 requires invalid pseudo-header fields to be rejected, and this is consistent with HTTP/2.
This commit is contained in:
parent
3897c97cc3
commit
c7d26ccc9b
@ -635,6 +635,10 @@ ngx_http_v3_process_header(ngx_http_request_t *r, ngx_str_t *name,
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
if (name->len && name->data[0] == ':') {
|
||||
return ngx_http_v3_process_pseudo_header(r, name, value);
|
||||
}
|
||||
|
||||
if (r->invalid_header) {
|
||||
cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
|
||||
|
||||
@ -646,10 +650,6 @@ ngx_http_v3_process_header(ngx_http_request_t *r, ngx_str_t *name,
|
||||
}
|
||||
}
|
||||
|
||||
if (name->len && name->data[0] == ':') {
|
||||
return ngx_http_v3_process_pseudo_header(r, name, value);
|
||||
}
|
||||
|
||||
if (ngx_http_v3_init_pseudo_headers(r) != NGX_OK) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user