diff src/http/v2/ngx_http_v2_table.c @ 7229:87e9e4aabf1b

HTTP/2: externalized various constants and interfaces.
author Maxim Dounin <mdounin@mdounin.ru>
date Sat, 17 Mar 2018 23:04:20 +0300
parents 2bf605c6edf7
children
line wrap: on
line diff
--- a/src/http/v2/ngx_http_v2_table.c
+++ b/src/http/v2/ngx_http_v2_table.c
@@ -86,6 +86,20 @@ static ngx_http_v2_header_t  ngx_http_v2
      / sizeof(ngx_http_v2_header_t))
 
 
+ngx_str_t *
+ngx_http_v2_get_static_name(ngx_uint_t index)
+{
+    return &ngx_http_v2_static_table[index - 1].name;
+}
+
+
+ngx_str_t *
+ngx_http_v2_get_static_value(ngx_uint_t index)
+{
+    return &ngx_http_v2_static_table[index - 1].value;
+}
+
+
 ngx_int_t
 ngx_http_v2_get_indexed_header(ngx_http_v2_connection_t *h2c, ngx_uint_t index,
     ngx_uint_t name_only)