mirror of
https://github.com/nginx/nginx.git
synced 2025-06-18 18:21:15 +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
a7ee5bffcc
commit
ed84f401cf
@ -635,6 +635,10 @@ ngx_http_v3_process_header(ngx_http_request_t *r, ngx_str_t *name,
|
|||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (name->len && name->data[0] == ':') {
|
||||||
|
return ngx_http_v3_process_pseudo_header(r, name, value);
|
||||||
|
}
|
||||||
|
|
||||||
if (r->invalid_header) {
|
if (r->invalid_header) {
|
||||||
cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
|
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) {
|
if (ngx_http_v3_init_pseudo_headers(r) != NGX_OK) {
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user