diff options
author | Sergey Kandaurov <pluknet@nginx.com> | 2025-06-20 18:46:17 +0400 |
---|---|---|
committer | Roman Arutyunyan <arutyunyan.roman@gmail.com> | 2025-06-21 10:36:28 +0400 |
commit | ba917b1360c6df3dda312325daccf714a3145718 (patch) | |
tree | 3c90c9f3c3f0b495a662aefc68087850a0bda793 /src | |
parent | 662c1dd2a97afd6c7ca09b8f5a74347ee017b86b (diff) | |
download | nginx-ba917b1360c6df3dda312325daccf714a3145718.tar.gz nginx-ba917b1360c6df3dda312325daccf714a3145718.zip |
HTTP/3: indexed field line encoding for "103 Early Hints".
Diffstat (limited to 'src')
-rw-r--r-- | src/http/v3/ngx_http_v3_filter_module.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/http/v3/ngx_http_v3_filter_module.c b/src/http/v3/ngx_http_v3_filter_module.c index 64e6b8e8d..e3f15368f 100644 --- a/src/http/v3/ngx_http_v3_filter_module.c +++ b/src/http/v3/ngx_http_v3_filter_module.c @@ -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 @@ ngx_http_v3_early_hints_filter(ngx_http_request_t *r) 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 @@ ngx_http_v3_early_hints_filter(ngx_http_request_t *r) "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; |