@@ -7,58 +7,56 @@ namespace asyncsrv {
77
88static constexpr const char *empty = " " ;
99
10- static constexpr const char *T_inline = " inline" ;
11- static constexpr const char *T_attachment = " attachment; filename=\" %s\" " ;
12-
1310static constexpr const char *T__opaque = " \" , opaque=\" " ;
1411static constexpr const char *T_100_CONTINUE = " 100-continue" ;
1512static constexpr const char *T_13 = " 13" ;
16- static constexpr const char *T_ACCEPT = " accept " ;
17- static constexpr const char *T_Accept_Ranges = " accept-ranges " ;
18- static constexpr const char *T_app_xform_urlencoded = " application/x-www-form-urlencoded " ;
19- static constexpr const char *T_AUTH = " authorization " ;
13+ static constexpr const char *T_ACCEPT = " Accept " ;
14+ static constexpr const char *T_Accept_Ranges = " Accept-Ranges " ;
15+ static constexpr const char *T_attachment = " attachment; filename= \" %s \" " ;
16+ static constexpr const char *T_AUTH = " Authorization " ;
2017static constexpr const char *T_auth_nonce = " \" , qop=\" auth\" , nonce=\" " ;
21- static constexpr const char *T_BASIC = " basic " ;
22- static constexpr const char *T_BASIC_REALM = " basic realm=\" " ;
23- static constexpr const char *T_BEARER = " bearer " ;
18+ static constexpr const char *T_BASIC = " Basic " ;
19+ static constexpr const char *T_BASIC_REALM = " Basic realm=\" " ;
20+ static constexpr const char *T_BEARER = " Bearer " ;
2421static constexpr const char *T_BODY = " body" ;
25- static constexpr const char *T_Cache_Control = " cache-control " ;
22+ static constexpr const char *T_Cache_Control = " Cache-Control " ;
2623static constexpr const char *T_chunked = " chunked" ;
2724static constexpr const char *T_close = " close" ;
2825static constexpr const char *T_cnonce = " cnonce" ;
29- static constexpr const char *T_Connection = " connection " ;
30- static constexpr const char *T_Content_Disposition = " content-disposition " ;
31- static constexpr const char *T_Content_Encoding = " content-encoding " ;
32- static constexpr const char *T_Content_Length = " content-length " ;
33- static constexpr const char *T_Content_Type = " content-type " ;
34- static constexpr const char *T_Content_Location = " content-location " ;
35- static constexpr const char *T_Cookie = " cookie " ;
36- static constexpr const char *T_CORS_ACAC = " access-control-allow-credentials " ;
37- static constexpr const char *T_CORS_ACAH = " access-control-allow-headers " ;
38- static constexpr const char *T_CORS_ACAM = " access-control-allow-methods " ;
39- static constexpr const char *T_CORS_ACAO = " access-control-allow-origin " ;
40- static constexpr const char *T_CORS_ACMA = " access-control-max-age " ;
41- static constexpr const char *T_CORS_O = " origin " ;
26+ static constexpr const char *T_Connection = " Connection " ;
27+ static constexpr const char *T_Content_Disposition = " Content-Disposition " ;
28+ static constexpr const char *T_Content_Encoding = " Content-Encoding " ;
29+ static constexpr const char *T_Content_Length = " Content-Length " ;
30+ static constexpr const char *T_Content_Type = " Content-Type " ;
31+ static constexpr const char *T_Content_Location = " Content-Location " ;
32+ static constexpr const char *T_Cookie = " Cookie " ;
33+ static constexpr const char *T_CORS_ACAC = " Access-Control-Allow-Credentials " ;
34+ static constexpr const char *T_CORS_ACAH = " Access-Control-Allow-Headers " ;
35+ static constexpr const char *T_CORS_ACAM = " Access-Control-Allow-Methods " ;
36+ static constexpr const char *T_CORS_ACAO = " Access-Control-Allow-Origin " ;
37+ static constexpr const char *T_CORS_ACMA = " Access-Control-Max-Age " ;
38+ static constexpr const char *T_CORS_O = " Origin " ;
4239static constexpr const char *T_data_ = " data: " ;
43- static constexpr const char *T_Date = " date " ;
44- static constexpr const char *T_DIGEST = " digest " ;
45- static constexpr const char *T_DIGEST_ = " digest " ;
46- static constexpr const char *T_ETag = " etag " ;
40+ static constexpr const char *T_Date = " Date " ;
41+ static constexpr const char *T_DIGEST = " Digest " ;
42+ static constexpr const char *T_DIGEST_ = " Digest " ;
43+ static constexpr const char *T_ETag = " ETag " ;
4744static constexpr const char *T_event_ = " event: " ;
48- static constexpr const char *T_EXPECT = " expect " ;
45+ static constexpr const char *T_EXPECT = " Expect " ;
4946static constexpr const char *T_FALSE = " false" ;
5047static constexpr const char *T_filename = " filename" ;
5148static constexpr const char *T_gzip = " gzip" ;
5249static constexpr const char *T_Host = " host" ;
5350static constexpr const char *T_HTTP_1_0 = " HTTP/1.0" ;
5451static constexpr const char *T_HTTP_100_CONT = " HTTP/1.1 100 Continue\r\n\r\n " ;
5552static constexpr const char *T_id__ = " id: " ;
56- static constexpr const char *T_IMS = " if-modified-since" ;
57- static constexpr const char *T_INM = " if-none-match" ;
53+ static constexpr const char *T_IMS = " If-Modified-Since" ;
54+ static constexpr const char *T_INM = " If-None-Match" ;
55+ static constexpr const char *T_inline = " inline" ;
5856static constexpr const char *T_keep_alive = " keep-alive" ;
59- static constexpr const char *T_Last_Event_ID = " last-event-id " ;
60- static constexpr const char *T_Last_Modified = " last-modified " ;
61- static constexpr const char *T_LOCATION = " location " ;
57+ static constexpr const char *T_Last_Event_ID = " Last-Event-ID " ;
58+ static constexpr const char *T_Last_Modified = " Last-Modified " ;
59+ static constexpr const char *T_LOCATION = " Location " ;
6260static constexpr const char *T_LOGIN_REQ = " Login Required" ;
6361static constexpr const char *T_MULTIPART_ = " multipart/" ;
6462static constexpr const char *T_name = " name" ;
@@ -72,21 +70,20 @@ static constexpr const char *T_realm = "realm";
7270static constexpr const char *T_realm__ = " realm=\" " ;
7371static constexpr const char *T_response = " response" ;
7472static constexpr const char *T_retry_ = " retry: " ;
75- static constexpr const char *T_retry_after = " retry-after " ;
73+ static constexpr const char *T_retry_after = " Retry-After " ;
7674static constexpr const char *T_nn = " \n\n " ;
7775static constexpr const char *T_rn = " \r\n " ;
7876static constexpr const char *T_rnrn = " \r\n\r\n " ;
79- static constexpr const char *T_Server = " server " ;
80- static constexpr const char *T_Transfer_Encoding = " transfer-encoding " ;
77+ static constexpr const char *T_Server = " Server " ;
78+ static constexpr const char *T_Transfer_Encoding = " Transfer-Encoding " ;
8179static constexpr const char *T_TRUE = " true" ;
82- static constexpr const char *T_UPGRADE = " upgrade " ;
80+ static constexpr const char *T_UPGRADE = " Upgrade " ;
8381static constexpr const char *T_uri = " uri" ;
8482static constexpr const char *T_username = " username" ;
8583static constexpr const char *T_WS = " websocket" ;
86- static constexpr const char *T_WWW_AUTH = " www-authenticate " ;
84+ static constexpr const char *T_WWW_AUTH = " WWW-Authenticate " ;
8785
8886// HTTP Methods
89-
9087static constexpr const char *T_ANY = " ANY" ;
9188static constexpr const char *T_GET = " GET" ;
9289static constexpr const char *T_POST = " POST" ;
@@ -131,6 +128,7 @@ static constexpr const char *T_application_json = "application/json";
131128static constexpr const char *T_application_msgpack = " application/msgpack" ;
132129static constexpr const char *T_application_pdf = " application/pdf" ;
133130static constexpr const char *T_application_x_gzip = " application/x-gzip" ;
131+ static constexpr const char *T_app_xform_urlencoded = " application/x-www-form-urlencoded" ;
134132static constexpr const char *T_application_zip = " application/zip" ;
135133static constexpr const char *T_font_eot = " font/eot" ;
136134static constexpr const char *T_font_ttf = " font/ttf" ;
@@ -182,19 +180,22 @@ static constexpr const char *T_HTTP_CODE_412 = "Precondition Failed";
182180static constexpr const char *T_HTTP_CODE_413 = " Request Entity Too Large" ;
183181static constexpr const char *T_HTTP_CODE_414 = " Request-URI Too Large" ;
184182static constexpr const char *T_HTTP_CODE_415 = " Unsupported Media Type" ;
185- static constexpr const char *T_HTTP_CODE_416 = " Requested range not satisfiable " ;
183+ static constexpr const char *T_HTTP_CODE_416 = " Requested Range Not Satisfiable " ;
186184static constexpr const char *T_HTTP_CODE_417 = " Expectation Failed" ;
187185static constexpr const char *T_HTTP_CODE_429 = " Too Many Requests" ;
188186static constexpr const char *T_HTTP_CODE_500 = " Internal Server Error" ;
189187static constexpr const char *T_HTTP_CODE_501 = " Not Implemented" ;
190188static constexpr const char *T_HTTP_CODE_502 = " Bad Gateway" ;
191189static constexpr const char *T_HTTP_CODE_503 = " Service Unavailable" ;
192190static constexpr const char *T_HTTP_CODE_504 = " Gateway Time-out" ;
193- static constexpr const char *T_HTTP_CODE_505 = " HTTP Version not supported " ;
191+ static constexpr const char *T_HTTP_CODE_505 = " HTTP Version Not Supported " ;
194192static constexpr const char *T_HTTP_CODE_ANY = " Unknown code" ;
195193
196- static constexpr const uint8_t T_only_once_headers_len = 11 ;
197- static constexpr const char *T_only_once_headers[] = {T_Content_Length, T_Content_Type, T_Date, T_ETag, T_Last_Modified, T_LOCATION, T_retry_after,
198- T_Transfer_Encoding, T_Content_Location, T_Server, T_WWW_AUTH};
194+ static constexpr const char *T_only_once_headers[] = {
195+ T_Accept_Ranges, T_Content_Length, T_Content_Type, T_Connection, T_CORS_ACAC, T_CORS_ACAH, T_CORS_ACAM, T_CORS_ACAO,
196+ T_CORS_ACMA, T_CORS_O, T_Date, T_DIGEST, T_ETag, T_Last_Modified, T_LOCATION, T_retry_after,
197+ T_Transfer_Encoding, T_Content_Location, T_Server, T_WWW_AUTH
198+ };
199+ static constexpr size_t T_only_once_headers_len = sizeof (T_only_once_headers) / sizeof (T_only_once_headers[0 ]);
199200
200201} // namespace asyncsrv
0 commit comments