Mercurial > nginx
changeset 9419:8c6978316ea4
HTTP/3: indexed field line encoding for "103 Early Hints".
| author | Sergey Kandaurov <pluknet@nginx.com> |
|---|---|
| date | Fri, 20 Jun 2025 18:46:17 +0400 |
| parents | 903a20d1200a |
| children | 666b706a30b3 |
| files | src/http/v3/ngx_http_v3_filter_module.c |
| diffstat | 1 files changed, 4 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/v3/ngx_http_v3_filter_module.c Fri Nov 15 08:23:53 2024 +0400 +++ b/src/http/v3/ngx_http_v3_filter_module.c Fri Jun 20 18:46:17 2025 +0400 @@ -20,6 +20,7 @@ #define NGX_HTTP_V3_HEADER_METHOD_GET 17 #define NGX_HTTP_V3_HEADER_SCHEME_HTTP 22 #define NGX_HTTP_V3_HEADER_SCHEME_HTTPS 23 +#define NGX_HTTP_V3_HEADER_STATUS_103 24 #define NGX_HTTP_V3_HEADER_STATUS_200 25 #define NGX_HTTP_V3_HEADER_ACCEPT_ENCODING 31 #define NGX_HTTP_V3_HEADER_CONTENT_TYPE_TEXT_PLAIN 53 @@ -640,9 +641,7 @@ len += ngx_http_v3_encode_field_section_prefix(NULL, 0, 0, 0); - len += ngx_http_v3_encode_field_lri(NULL, 0, - NGX_HTTP_V3_HEADER_STATUS_200, - NULL, 3); + len += ngx_http_v3_encode_field_ri(NULL, 0, NGX_HTTP_V3_HEADER_STATUS_103); ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "http3 header len:%uz", len); @@ -659,10 +658,8 @@ "http3 output header: \":status: %03ui\"", (ngx_uint_t) NGX_HTTP_EARLY_HINTS); - b->last = (u_char *) ngx_http_v3_encode_field_lri(b->last, 0, - NGX_HTTP_V3_HEADER_STATUS_200, - NULL, 3); - b->last = ngx_sprintf(b->last, "%03ui", (ngx_uint_t) NGX_HTTP_EARLY_HINTS); + b->last = (u_char *) ngx_http_v3_encode_field_ri(b->last, 0, + NGX_HTTP_V3_HEADER_STATUS_103); part = &r->headers_out.headers.part; header = part->elts;
