整理 http/http2 公共的 header 字段,存储到 tfe_http.cpp 文件中

This commit is contained in:
luwenpeng
2019-09-16 11:37:18 +08:00
parent 4b0235d199
commit de16d2da87
6 changed files with 65 additions and 84 deletions

View File

@@ -4,7 +4,7 @@
#include <tfe_http.h>
#include <tfe_plugin.h>
static const char * __str_std_header_field_map[] =
const char * __str_std_header_field_map[] =
{
[TFE_HTTP_UNKNOWN_FIELD] = NULL,
[TFE_HTTP_HOST] = "Host",
@@ -39,6 +39,7 @@ static const char * __str_std_header_field_map[] =
[TFE_HTTP_IF_UNMODIFIED_SINCE] = "If-Unmodified-Since",
[TFE_HTTP_LAST_MODIFIED] = "Last-Modified"
};
const unsigned int __str_std_header_field_map_size = sizeof(__str_std_header_field_map) / sizeof(__str_std_header_field_map[0]);
static const char * __str_std_method_map[1024] = {};
void __str_std_method_map_init() __attribute__((constructor, used));