comparison src/http/v3/ngx_http_v3_request.c @ 8832:0d35b1ff6af5 quic

HTTP/3: disabled control characters and space in header names. This is a follow up to 41f4bd4c51f1.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 10 Aug 2021 12:35:12 +0300
parents c35b255d80dc
children d8d48c977b0f
comparison
equal deleted inserted replaced
8831:598f8e3bef30 8832:0d35b1ff6af5
426 || (ch == '_' && cscf->underscores_in_headers)) 426 || (ch == '_' && cscf->underscores_in_headers))
427 { 427 {
428 continue; 428 continue;
429 } 429 }
430 430
431 if (ch == '\0' || ch == LF || ch == CR || ch == ':' 431 if (ch <= 0x20 || ch == 0x7f || ch == ':'
432 || (ch >= 'A' && ch <= 'Z')) 432 || (ch >= 'A' && ch <= 'Z'))
433 { 433 {
434 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, 434 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
435 "client sent invalid header name: \"%V\"", name); 435 "client sent invalid header name: \"%V\"", name);
436 436