@@ -7,58 +7,56 @@ namespace asyncsrv {
7
7
8
8
static constexpr const char *empty = " " ;
9
9
10
- static constexpr const char *T_inline = " inline" ;
11
- static constexpr const char *T_attachment = " attachment; filename=\" %s\" " ;
12
-
13
10
static constexpr const char *T__opaque = " \" , opaque=\" " ;
14
11
static constexpr const char *T_100_CONTINUE = " 100-continue" ;
15
12
static 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 " ;
20
17
static 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 " ;
24
21
static 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 " ;
26
23
static constexpr const char *T_chunked = " chunked" ;
27
24
static constexpr const char *T_close = " close" ;
28
25
static 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 " ;
42
39
static 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 " ;
47
44
static constexpr const char *T_event_ = " event: " ;
48
- static constexpr const char *T_EXPECT = " expect " ;
45
+ static constexpr const char *T_EXPECT = " Expect " ;
49
46
static constexpr const char *T_FALSE = " false" ;
50
47
static constexpr const char *T_filename = " filename" ;
51
48
static constexpr const char *T_gzip = " gzip" ;
52
49
static constexpr const char *T_Host = " host" ;
53
50
static constexpr const char *T_HTTP_1_0 = " HTTP/1.0" ;
54
51
static constexpr const char *T_HTTP_100_CONT = " HTTP/1.1 100 Continue\r\n\r\n " ;
55
52
static 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" ;
58
56
static 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 " ;
62
60
static constexpr const char *T_LOGIN_REQ = " Login Required" ;
63
61
static constexpr const char *T_MULTIPART_ = " multipart/" ;
64
62
static constexpr const char *T_name = " name" ;
@@ -72,21 +70,20 @@ static constexpr const char *T_realm = "realm";
72
70
static constexpr const char *T_realm__ = " realm=\" " ;
73
71
static constexpr const char *T_response = " response" ;
74
72
static 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 " ;
76
74
static constexpr const char *T_nn = " \n\n " ;
77
75
static constexpr const char *T_rn = " \r\n " ;
78
76
static 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 " ;
81
79
static constexpr const char *T_TRUE = " true" ;
82
- static constexpr const char *T_UPGRADE = " upgrade " ;
80
+ static constexpr const char *T_UPGRADE = " Upgrade " ;
83
81
static constexpr const char *T_uri = " uri" ;
84
82
static constexpr const char *T_username = " username" ;
85
83
static 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 " ;
87
85
88
86
// HTTP Methods
89
-
90
87
static constexpr const char *T_ANY = " ANY" ;
91
88
static constexpr const char *T_GET = " GET" ;
92
89
static constexpr const char *T_POST = " POST" ;
@@ -131,6 +128,7 @@ static constexpr const char *T_application_json = "application/json";
131
128
static constexpr const char *T_application_msgpack = " application/msgpack" ;
132
129
static constexpr const char *T_application_pdf = " application/pdf" ;
133
130
static constexpr const char *T_application_x_gzip = " application/x-gzip" ;
131
+ static constexpr const char *T_app_xform_urlencoded = " application/x-www-form-urlencoded" ;
134
132
static constexpr const char *T_application_zip = " application/zip" ;
135
133
static constexpr const char *T_font_eot = " font/eot" ;
136
134
static constexpr const char *T_font_ttf = " font/ttf" ;
@@ -182,19 +180,22 @@ static constexpr const char *T_HTTP_CODE_412 = "Precondition Failed";
182
180
static constexpr const char *T_HTTP_CODE_413 = " Request Entity Too Large" ;
183
181
static constexpr const char *T_HTTP_CODE_414 = " Request-URI Too Large" ;
184
182
static 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 " ;
186
184
static constexpr const char *T_HTTP_CODE_417 = " Expectation Failed" ;
187
185
static constexpr const char *T_HTTP_CODE_429 = " Too Many Requests" ;
188
186
static constexpr const char *T_HTTP_CODE_500 = " Internal Server Error" ;
189
187
static constexpr const char *T_HTTP_CODE_501 = " Not Implemented" ;
190
188
static constexpr const char *T_HTTP_CODE_502 = " Bad Gateway" ;
191
189
static constexpr const char *T_HTTP_CODE_503 = " Service Unavailable" ;
192
190
static 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 " ;
194
192
static constexpr const char *T_HTTP_CODE_ANY = " Unknown code" ;
195
193
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 ]);
199
200
200
201
} // namespace asyncsrv
0 commit comments