1 // Copyright 2021 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "quiche/balsa/standard_header_map.h"
6
7 namespace quiche {
8
GetStandardHeaderSet()9 const StandardHttpHeaderNameSet& GetStandardHeaderSet() {
10 static const StandardHttpHeaderNameSet* const header_map =
11 new StandardHttpHeaderNameSet({
12 {"Accept"},
13 {"Accept-Charset"},
14 {"Accept-CH"},
15 {"Accept-CH-Lifetime"},
16 {"Accept-Encoding"},
17 {"Accept-Language"},
18 {"Accept-Ranges"},
19 {"Access-Control-Allow-Credentials"},
20 {"Access-Control-Allow-Headers"},
21 {"Access-Control-Allow-Methods"},
22 {"Access-Control-Allow-Origin"},
23 {"Access-Control-Expose-Headers"},
24 {"Access-Control-Max-Age"},
25 {"Access-Control-Request-Headers"},
26 {"Access-Control-Request-Method"},
27 {"Age"},
28 {"Allow"},
29 {"Authorization"},
30 {"Cache-Control"},
31 {"Connection"},
32 {"Content-Disposition"},
33 {"Content-Encoding"},
34 {"Content-Language"},
35 {"Content-Length"},
36 {"Content-Location"},
37 {"Content-Range"},
38 {"Content-Security-Policy"},
39 {"Content-Security-Policy-Report-Only"},
40 {"X-Content-Security-Policy"},
41 {"X-Content-Security-Policy-Report-Only"},
42 {"X-WebKit-CSP"},
43 {"X-WebKit-CSP-Report-Only"},
44 {"Content-Type"},
45 {"Content-MD5"},
46 {"X-Content-Type-Options"},
47 {"Cookie"},
48 {"Cookie2"},
49 {"Cross-Origin-Resource-Policy"},
50 {"Cross-Origin-Opener-Policy"},
51 {"Date"},
52 {"DAV"},
53 {"Depth"},
54 {"Destination"},
55 {"DNT"},
56 {"DPR"},
57 {"Early-Data"},
58 {"ETag"},
59 {"Expect"},
60 {"Expires"},
61 {"Follow-Only-When-Prerender-Shown"},
62 {"Forwarded"},
63 {"From"},
64 {"Host"},
65 {"HTTP2-Settings"},
66 {"If"},
67 {"If-Match"},
68 {"If-Modified-Since"},
69 {"If-None-Match"},
70 {"If-Range"},
71 {"If-Unmodified-Since"},
72 {"Keep-Alive"},
73 {"Label"},
74 {"Last-Modified"},
75 {"Link"},
76 {"Location"},
77 {"Lock-Token"},
78 {"Max-Forwards"},
79 {"MS-Author-Via"},
80 {"Origin"},
81 {"Overwrite"},
82 {"P3P"},
83 {"Ping-From"},
84 {"Ping-To"},
85 {"Pragma"},
86 {"Proxy-Connection"},
87 {"Proxy-Authenticate"},
88 {"Public-Key-Pins"},
89 {"Public-Key-Pins-Report-Only"},
90 {"Range"},
91 {"Referer"},
92 {"Referrer-Policy"},
93 {"Refresh"},
94 {"Report-To"},
95 {"Retry-After"},
96 {"Sec-Fetch-Dest"},
97 {"Sec-Fetch-Mode"},
98 {"Sec-Fetch-Site"},
99 {"Sec-Fetch-User"},
100 {"Sec-Metadata"},
101 {"Sec-Token-Binding"},
102 {"Sec-Provided-Token-Binding-ID"},
103 {"Sec-Referred-Token-Binding-ID"},
104 {"Sec-WebSocket-Accept"},
105 {"Sec-WebSocket-Extensions"},
106 {"Sec-WebSocket-Key"},
107 {"Sec-WebSocket-Protocol"},
108 {"Sec-WebSocket-Version"},
109 {"Server"},
110 {"Server-Timing"},
111 {"Service-Worker"},
112 {"Service-Worker-Allowed"},
113 {"Service-Worker-Navigation-Preload"},
114 {"Set-Cookie"},
115 {"Set-Cookie2"},
116 {"Status-URI"},
117 {"Strict-Transport-Security"},
118 {"SourceMap"},
119 {"Timeout"},
120 {"Timing-Allow-Origin"},
121 {"Tk"},
122 {"Trailer"},
123 {"Trailers"},
124 {"Transfer-Encoding"},
125 {"TE"},
126 {"Upgrade"},
127 {"Upgrade-Insecure-Requests"},
128 {"User-Agent"},
129 {"X-OperaMini-Phone-UA"},
130 {"X-UCBrowser-UA"},
131 {"X-UCBrowser-Device-UA"},
132 {"X-Device-User-Agent"},
133 {"Vary"},
134 {"Via"},
135 {"CDN-Loop"},
136 {"Warning"},
137 {"WWW-Authenticate"},
138 });
139
140 return *header_map;
141 }
142
143 } // namespace quiche
144