From 32f98ecbb13acc9c22db4dd7e9bec20eb30b945a Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Wed, 5 May 2021 15:00:17 +0300 Subject: HTTP/3: moved parsing uni stream type to ngx_http_v3_parse.c. Previously it was parsed in ngx_http_v3_streams.c, while the streams were parsed in ngx_http_v3_parse.c. Now all parsing is done in one file. This simplifies parsing API and cleans up ngx_http_v3_streams.c. --- src/http/v3/ngx_http_v3_parse.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/http/v3/ngx_http_v3_parse.h') diff --git a/src/http/v3/ngx_http_v3_parse.h b/src/http/v3/ngx_http_v3_parse.h index f039ac28d..c187b7bc2 100644 --- a/src/http/v3/ngx_http_v3_parse.h +++ b/src/http/v3/ngx_http_v3_parse.h @@ -106,6 +106,17 @@ typedef struct { } ngx_http_v3_parse_control_t; +typedef struct { + ngx_uint_t state; + ngx_http_v3_parse_varlen_int_t vlint; + union { + ngx_http_v3_parse_encoder_t encoder; + ngx_http_v3_parse_decoder_t decoder; + ngx_http_v3_parse_control_t control; + } u; +} ngx_http_v3_parse_uni_t; + + typedef struct { ngx_uint_t state; ngx_uint_t type; @@ -128,10 +139,8 @@ ngx_int_t ngx_http_v3_parse_headers(ngx_connection_t *c, ngx_http_v3_parse_headers_t *st, u_char ch); ngx_int_t ngx_http_v3_parse_data(ngx_connection_t *c, ngx_http_v3_parse_data_t *st, u_char ch); - -ngx_int_t ngx_http_v3_parse_control(ngx_connection_t *c, void *data, u_char ch); -ngx_int_t ngx_http_v3_parse_encoder(ngx_connection_t *c, void *data, u_char ch); -ngx_int_t ngx_http_v3_parse_decoder(ngx_connection_t *c, void *data, u_char ch); +ngx_int_t ngx_http_v3_parse_uni(ngx_connection_t *c, + ngx_http_v3_parse_uni_t *st, u_char ch); #endif /* _NGX_HTTP_V3_PARSE_H_INCLUDED_ */ -- cgit