From 45c21f62f9a9230eb5d57c03de13f4a9b419bcee Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Fri, 2 Jun 2017 21:54:12 +0800 Subject: [PATCH] [WebAPI] Convert all header name constants to lowercase This save us another transition when some day we implements HTTP/2 (which all headers are in lowercase). --- src/base/http/types.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/base/http/types.h b/src/base/http/types.h index bf1d53ad2..cc86e79d6 100644 --- a/src/base/http/types.h +++ b/src/base/http/types.h @@ -37,20 +37,20 @@ namespace Http { - const char HEADER_CACHE_CONTROL[] = "Cache-Control"; - const char HEADER_CONTENT_ENCODING[] = "Content-Encoding"; - const char HEADER_CONTENT_LENGTH[] = "Content-Length"; - const char HEADER_CONTENT_SECURITY_POLICY[] = "Content-Security-Policy"; - const char HEADER_CONTENT_TYPE[] = "Content-Type"; - const char HEADER_DATE[] = "Date"; + const char HEADER_CACHE_CONTROL[] = "cache-control"; + const char HEADER_CONTENT_ENCODING[] = "content-encoding"; + const char HEADER_CONTENT_LENGTH[] = "content-length"; + const char HEADER_CONTENT_SECURITY_POLICY[] = "content-security-policy"; + const char HEADER_CONTENT_TYPE[] = "content-type"; + const char HEADER_DATE[] = "date"; const char HEADER_HOST[] = "host"; const char HEADER_ORIGIN[] = "origin"; const char HEADER_REFERER[] = "referer"; - const char HEADER_SET_COOKIE[] = "Set-Cookie"; - const char HEADER_X_CONTENT_TYPE_OPTIONS[] = "X-Content-Type-Options"; + const char HEADER_SET_COOKIE[] = "set-cookie"; + const char HEADER_X_CONTENT_TYPE_OPTIONS[] = "x-content-type-options"; const char HEADER_X_FORWARDED_HOST[] = "x-forwarded-host"; - const char HEADER_X_FRAME_OPTIONS[] = "X-Frame-Options"; - const char HEADER_X_XSS_PROTECTION[] = "X-XSS-Protection"; + const char HEADER_X_FRAME_OPTIONS[] = "x-frame-options"; + const char HEADER_X_XSS_PROTECTION[] = "x-xss-protection"; const char CONTENT_TYPE_CSS[] = "text/css; charset=UTF-8"; const char CONTENT_TYPE_GIF[] = "image/gif";