]> git.kaiwu.me - nginx.git/commitdiff
HTTP/3: staticize internal parsing functions.
authorSergey Kandaurov <pluknet@nginx.com>
Wed, 16 Dec 2020 12:47:41 +0000 (12:47 +0000)
committerSergey Kandaurov <pluknet@nginx.com>
Wed, 16 Dec 2020 12:47:41 +0000 (12:47 +0000)
src/http/v3/ngx_http_v3_parse.c
src/http/v3/ngx_http_v3_parse.h

index afe4424640256bd9c9e521e1fe72f46fabfec029..7c22b482c22d0d3991d2237852dc29db0aa87fc0 100644 (file)
     ((type) == 0x02 || (type) == 0x06 || (type) == 0x08 || (type) == 0x09)
 
 
+static ngx_int_t ngx_http_v3_parse_settings(ngx_connection_t *c,
+    ngx_http_v3_parse_settings_t *st, u_char ch);
+
+static ngx_int_t ngx_http_v3_parse_varlen_int(ngx_connection_t *c,
+    ngx_http_v3_parse_varlen_int_t *st, u_char ch);
+static ngx_int_t ngx_http_v3_parse_prefix_int(ngx_connection_t *c,
+    ngx_http_v3_parse_prefix_int_t *st, ngx_uint_t prefix, u_char ch);
+
+static ngx_int_t ngx_http_v3_parse_header_block_prefix(ngx_connection_t *c,
+    ngx_http_v3_parse_header_block_prefix_t *st, u_char ch);
+static ngx_int_t ngx_http_v3_parse_header_rep(ngx_connection_t *c,
+    ngx_http_v3_parse_header_rep_t *st, ngx_uint_t base, u_char ch);
+static ngx_int_t ngx_http_v3_parse_literal(ngx_connection_t *c,
+    ngx_http_v3_parse_literal_t *st, u_char ch);
+static ngx_int_t ngx_http_v3_parse_header_ri(ngx_connection_t *c,
+    ngx_http_v3_parse_header_t *st, u_char ch);
+static ngx_int_t ngx_http_v3_parse_header_lri(ngx_connection_t *c,
+    ngx_http_v3_parse_header_t *st, u_char ch);
+static ngx_int_t ngx_http_v3_parse_header_l(ngx_connection_t *c,
+    ngx_http_v3_parse_header_t *st, u_char ch);
+static ngx_int_t ngx_http_v3_parse_header_pbi(ngx_connection_t *c,
+    ngx_http_v3_parse_header_t *st, u_char ch);
+static ngx_int_t ngx_http_v3_parse_header_lpbi(ngx_connection_t *c,
+    ngx_http_v3_parse_header_t *st, u_char ch);
+
+static ngx_int_t ngx_http_v3_parse_header_inr(ngx_connection_t *c,
+    ngx_http_v3_parse_header_t *st, u_char ch);
+static ngx_int_t ngx_http_v3_parse_header_iwnr(ngx_connection_t *c,
+    ngx_http_v3_parse_header_t *st, u_char ch);
+
 static ngx_int_t ngx_http_v3_parse_lookup(ngx_connection_t *c,
     ngx_uint_t dynamic, ngx_uint_t index, ngx_str_t *name, ngx_str_t *value);
 
 
-ngx_int_t
+static ngx_int_t
 ngx_http_v3_parse_varlen_int(ngx_connection_t *c,
     ngx_http_v3_parse_varlen_int_t *st, u_char ch)
 {
@@ -95,7 +125,7 @@ done:
 }
 
 
-ngx_int_t
+static ngx_int_t
 ngx_http_v3_parse_prefix_int(ngx_connection_t *c,
     ngx_http_v3_parse_prefix_int_t *st, ngx_uint_t prefix, u_char ch)
 {
@@ -289,7 +319,7 @@ done:
 }
 
 
-ngx_int_t
+static ngx_int_t
 ngx_http_v3_parse_header_block_prefix(ngx_connection_t *c,
     ngx_http_v3_parse_header_block_prefix_t *st, u_char ch)
 {
@@ -366,7 +396,7 @@ done:
 }
 
 
-ngx_int_t
+static ngx_int_t
 ngx_http_v3_parse_header_rep(ngx_connection_t *c,
     ngx_http_v3_parse_header_rep_t *st, ngx_uint_t base, u_char ch)
 {
@@ -454,7 +484,7 @@ ngx_http_v3_parse_header_rep(ngx_connection_t *c,
 }
 
 
-ngx_int_t
+static ngx_int_t
 ngx_http_v3_parse_literal(ngx_connection_t *c, ngx_http_v3_parse_literal_t *st,
     u_char ch)
 {
@@ -533,7 +563,7 @@ done:
 }
 
 
-ngx_int_t
+static ngx_int_t
 ngx_http_v3_parse_header_ri(ngx_connection_t *c, ngx_http_v3_parse_header_t *st,
     u_char ch)
 {
@@ -588,7 +618,7 @@ done:
 }
 
 
-ngx_int_t
+static ngx_int_t
 ngx_http_v3_parse_header_lri(ngx_connection_t *c,
     ngx_http_v3_parse_header_t *st, u_char ch)
 {
@@ -679,7 +709,7 @@ done:
 }
 
 
-ngx_int_t
+static ngx_int_t
 ngx_http_v3_parse_header_l(ngx_connection_t *c,
     ngx_http_v3_parse_header_t *st, u_char ch)
 {
@@ -777,7 +807,7 @@ done:
 }
 
 
-ngx_int_t
+static ngx_int_t
 ngx_http_v3_parse_header_pbi(ngx_connection_t *c,
     ngx_http_v3_parse_header_t *st, u_char ch)
 {
@@ -826,7 +856,7 @@ done:
 }
 
 
-ngx_int_t
+static ngx_int_t
 ngx_http_v3_parse_header_lpbi(ngx_connection_t *c,
     ngx_http_v3_parse_header_t *st, u_char ch)
 {
@@ -1118,7 +1148,7 @@ ngx_http_v3_parse_control(ngx_connection_t *c, void *data, u_char ch)
 }
 
 
-ngx_int_t
+static ngx_int_t
 ngx_http_v3_parse_settings(ngx_connection_t *c,
     ngx_http_v3_parse_settings_t *st, u_char ch)
 {
@@ -1277,7 +1307,7 @@ done:
 }
 
 
-ngx_int_t
+static ngx_int_t
 ngx_http_v3_parse_header_inr(ngx_connection_t *c,
     ngx_http_v3_parse_header_t *st, u_char ch)
 {
@@ -1364,7 +1394,7 @@ done:
 }
 
 
-ngx_int_t
+static ngx_int_t
 ngx_http_v3_parse_header_iwnr(ngx_connection_t *c,
     ngx_http_v3_parse_header_t *st, u_char ch)
 {
index 856f021bd67addffb2a50ccb2d6358abd9bfef5f..f039ac28d41fed768274d96eca8fbcb19c4418f8 100644 (file)
@@ -124,44 +124,14 @@ typedef struct {
  *   NGX_HTTP_V3_ERROR_XXX - HTTP/3 or QPACK error
  */
 
-ngx_int_t ngx_http_v3_parse_varlen_int(ngx_connection_t *c,
-    ngx_http_v3_parse_varlen_int_t *st, u_char ch);
-ngx_int_t ngx_http_v3_parse_prefix_int(ngx_connection_t *c,
-    ngx_http_v3_parse_prefix_int_t *st, ngx_uint_t prefix, u_char ch);
-
 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_header_block_prefix(ngx_connection_t *c,
-    ngx_http_v3_parse_header_block_prefix_t *st, u_char ch);
-ngx_int_t ngx_http_v3_parse_header_rep(ngx_connection_t *c,
-    ngx_http_v3_parse_header_rep_t *st, ngx_uint_t base, u_char ch);
-ngx_int_t ngx_http_v3_parse_literal(ngx_connection_t *c,
-    ngx_http_v3_parse_literal_t *st, u_char ch);
-ngx_int_t ngx_http_v3_parse_header_ri(ngx_connection_t *c,
-    ngx_http_v3_parse_header_t *st, u_char ch);
-ngx_int_t ngx_http_v3_parse_header_lri(ngx_connection_t *c,
-    ngx_http_v3_parse_header_t *st, u_char ch);
-ngx_int_t ngx_http_v3_parse_header_l(ngx_connection_t *c,
-    ngx_http_v3_parse_header_t *st, u_char ch);
-ngx_int_t ngx_http_v3_parse_header_pbi(ngx_connection_t *c,
-    ngx_http_v3_parse_header_t *st, u_char ch);
-ngx_int_t ngx_http_v3_parse_header_lpbi(ngx_connection_t *c,
-    ngx_http_v3_parse_header_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_settings(ngx_connection_t *c,
-    ngx_http_v3_parse_settings_t *st, 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_header_inr(ngx_connection_t *c,
-    ngx_http_v3_parse_header_t *st, u_char ch);
-ngx_int_t ngx_http_v3_parse_header_iwnr(ngx_connection_t *c,
-    ngx_http_v3_parse_header_t *st, 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_data(ngx_connection_t *c,
-    ngx_http_v3_parse_data_t *st, u_char ch);
-
 
 #endif /* _NGX_HTTP_V3_PARSE_H_INCLUDED_ */