Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
7228:0f811890f2f0 | 7229:87e9e4aabf1b |
---|---|
84 #define NGX_HTTP_V2_STATIC_TABLE_ENTRIES \ | 84 #define NGX_HTTP_V2_STATIC_TABLE_ENTRIES \ |
85 (sizeof(ngx_http_v2_static_table) \ | 85 (sizeof(ngx_http_v2_static_table) \ |
86 / sizeof(ngx_http_v2_header_t)) | 86 / sizeof(ngx_http_v2_header_t)) |
87 | 87 |
88 | 88 |
89 ngx_str_t * | |
90 ngx_http_v2_get_static_name(ngx_uint_t index) | |
91 { | |
92 return &ngx_http_v2_static_table[index - 1].name; | |
93 } | |
94 | |
95 | |
96 ngx_str_t * | |
97 ngx_http_v2_get_static_value(ngx_uint_t index) | |
98 { | |
99 return &ngx_http_v2_static_table[index - 1].value; | |
100 } | |
101 | |
102 | |
89 ngx_int_t | 103 ngx_int_t |
90 ngx_http_v2_get_indexed_header(ngx_http_v2_connection_t *h2c, ngx_uint_t index, | 104 ngx_http_v2_get_indexed_header(ngx_http_v2_connection_t *h2c, ngx_uint_t index, |
91 ngx_uint_t name_only) | 105 ngx_uint_t name_only) |
92 { | 106 { |
93 u_char *p; | 107 u_char *p; |