#174 在 http2 解析 header 时,修改 headerlength 的获取方式

* 原来是使用 strlen(header) 获取 headerlength
* 现在改为使用 http2 callback 传入的 headerlength

暗示着 header 字段可能不以 '\0' 结尾
This commit is contained in:
luwenpeng
2019-09-24 11:06:38 +08:00
parent 7c99fddde9
commit afa3bed4ae
3 changed files with 11 additions and 6 deletions

View File

@@ -52,7 +52,7 @@ str_to_val(const char *val, const struct value_string *vs);
const char*
http2_header_val_to_str(unsigned int val, const char * map[], unsigned int map_size);
int
http2_header_str_to_val(const char *str, const char * map[], unsigned int map_size);
http2_header_str_to_val(const char *str, size_t slen, const char * map[], unsigned int map_size);
#define BV(x) (1 << x)
#define HTTP2_CONTENT_ENCODING_NONE 0