增加Cache-Control相关HTTP头部字段标准域定义

This commit is contained in:
Lu Qiuwen
2018-10-14 14:29:23 +08:00
parent 3b012a0593
commit cb27db40f2
3 changed files with 16 additions and 4 deletions

View File

@@ -40,7 +40,13 @@ static const char * __str_std_header_field_map[] =
[TFE_HTTP_CONT_TYPE] = "Content-Type",
[TFE_HTTP_CONT_DISPOSITION] = "Content-Disposition",
[TFE_HTTP_EXPIRES] = "Expires",
[TFE_HTTP_ACCEPT_ENCODING] = "Accept-Encoding"
[TFE_HTTP_ACCEPT_ENCODING] = "Accept-Encoding",
[TFE_HTTP_CACHE_CONTROL] = "Cache-Control",
[TFE_HTTP_IF_MATCH] = "If-Match",
[TFE_HTTP_IF_NONE_MATCH] = "If-None-Match",
[TFE_HTTP_IF_MODIFIED_SINCE] = "If-Modified-Since",
[TFE_HTTP_IF_UNMODIFIED_SINCE] = "If-Unmodified-Since",
[TFE_HTTP_LAST_MODIFIED] = "Last-Modified"
};
static const char * __str_std_method_map[1024] = {};

View File

@@ -348,7 +348,7 @@ unsigned int tfe_proxy_get_thread_count(void)
struct event_base * tfe_proxy_get_evbase(unsigned int thread_id)
{
assert(thread_id<g_default_proxy->nr_work_threads);
return g_default_proxy->work_threads[thread_id].evbase;
return g_default_proxy->work_threads[thread_id]->evbase;
}

View File

@@ -41,7 +41,13 @@ static const char * __str_std_header_field_map[] =
[TFE_HTTP_CONT_TYPE] = "Content-Type",
[TFE_HTTP_CONT_DISPOSITION] = "Content-Disposition",
[TFE_HTTP_EXPIRES] = "Expires",
[TFE_HTTP_ACCEPT_ENCODING] = "Accept-Encoding"
[TFE_HTTP_ACCEPT_ENCODING] = "Accept-Encoding",
[TFE_HTTP_CACHE_CONTROL] = "Cache-Control",
[TFE_HTTP_IF_MATCH] = "If-Match",
[TFE_HTTP_IF_NONE_MATCH] = "If-None-Match",
[TFE_HTTP_IF_MODIFIED_SINCE] = "If-Modified-Since",
[TFE_HTTP_IF_UNMODIFIED_SINCE] = "If-Unmodified-Since",
[TFE_HTTP_LAST_MODIFIED] = "Last-Modified"
};
static enum tfe_http_std_field __str_header_field_to_std_field_id(const char * str_field, size_t len)