Skip to content

Commit f1d7d63

Browse files
authored
Merge pull request #107 from Licenser/patch-1
Update constants.rs
2 parents 63fa43d + 0c6765a commit f1d7d63

File tree

1 file changed

+113
-1
lines changed

1 file changed

+113
-1
lines changed

src/headers/constants.rs

Lines changed: 113 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
use super::HeaderName;
22

3+
/// The `Content-Encoding` Header
4+
pub const CONTENT_ENCODING: HeaderName = HeaderName::from_lowercase_str("content-encoding");
5+
/// The `Content-Language` Header
6+
pub const CONTENT_LANGUAGE: HeaderName = HeaderName::from_lowercase_str("content-language");
37
/// The `Content-Length` Header
48
pub const CONTENT_LENGTH: HeaderName = HeaderName::from_lowercase_str("content-length");
5-
9+
/// The `Content-Location` Header
10+
pub const CONTENT_LOCATION: HeaderName = HeaderName::from_lowercase_str("content-location");
11+
/// The `Content-MD5` Header
12+
pub const CONTENT_MD5: HeaderName = HeaderName::from_lowercase_str("content-md5");
13+
/// The `Content-Range` Header
14+
pub const CONTENT_RANGE: HeaderName = HeaderName::from_lowercase_str("content-range");
615
/// The `Content-Type` Header
716
pub const CONTENT_TYPE: HeaderName = HeaderName::from_lowercase_str("content-type");
817

@@ -48,3 +57,106 @@ pub const ACCESS_CONTROL_REQUEST_HEADERS: HeaderName =
4857
/// The `access-control-allow-credentials` Header
4958
pub const ACCESS_CONTROL_ALLOW_CREDENTIALS: HeaderName =
5059
HeaderName::from_lowercase_str("access-control-allow-credentials");
60+
61+
/// The `Accept` Header
62+
pub const ACCEPT: HeaderName = HeaderName::from_lowercase_str("accept");
63+
/// The `Accept-Charset` Header
64+
pub const ACCEPT_CHARSET: HeaderName = HeaderName::from_lowercase_str("accept-charset");
65+
/// The `Accept-Encoding` Header
66+
pub const ACCEPT_ENCODING: HeaderName = HeaderName::from_lowercase_str("accept-encoding");
67+
/// The `Accept-Language` Header
68+
pub const ACCEPT_LANGUAGE: HeaderName = HeaderName::from_lowercase_str("accept-language");
69+
/// The `Accept-Ranges` Header
70+
pub const ACCEPT_RANGES: HeaderName = HeaderName::from_lowercase_str("accept-ranges");
71+
72+
/// The `Age` Header
73+
pub const AGE: HeaderName = HeaderName::from_lowercase_str("age");
74+
75+
/// The `Allow` Header
76+
pub const ALLOW: HeaderName = HeaderName::from_lowercase_str("allow");
77+
78+
/// The `Authorization` Header
79+
pub const AUTHORIZATION: HeaderName = HeaderName::from_lowercase_str("authorization");
80+
81+
/// The `Cache-Control` Header
82+
pub const CACHE_CONTROL: HeaderName = HeaderName::from_lowercase_str("cache-control");
83+
84+
/// The `Connection` Header
85+
pub const CONNECTION: HeaderName = HeaderName::from_lowercase_str("connection");
86+
87+
/// The `ETag` Header
88+
pub const ETAG: HeaderName = HeaderName::from_lowercase_str("etag");
89+
90+
/// The `Expect` Header
91+
pub const EXPECT: HeaderName = HeaderName::from_lowercase_str("expect");
92+
93+
/// The `Expires` Header
94+
pub const EXPIRES: HeaderName = HeaderName::from_lowercase_str("expires");
95+
96+
/// The `From` Header
97+
pub const FROM: HeaderName = HeaderName::from_lowercase_str("from");
98+
99+
/// The `If-Match` Header
100+
pub const IF_MATCH: HeaderName = HeaderName::from_lowercase_str("if-match");
101+
102+
/// The `If-Modified-Since` Header
103+
pub const IF_MODIFIED_SINCE: HeaderName = HeaderName::from_lowercase_str("if-modified-since");
104+
105+
/// The `If-None-Match` Header
106+
pub const IF_NONE_MATCH: HeaderName = HeaderName::from_lowercase_str("if-none-match");
107+
108+
/// The `If-Range` Header
109+
pub const IF_RANGE: HeaderName = HeaderName::from_lowercase_str("if-range");
110+
111+
/// The `If-Unmodified-Since` Header
112+
pub const IF_UNMODIFIED_SINCE: HeaderName = HeaderName::from_lowercase_str("if-unmodified-since");
113+
114+
/// The `Last-Modified` Header
115+
pub const LAST_MODIFIED: HeaderName = HeaderName::from_lowercase_str("last-modified");
116+
117+
/// The `Location` Header
118+
pub const LOCATION: HeaderName = HeaderName::from_lowercase_str("location");
119+
120+
/// The `Max-Forwards` Header
121+
pub const MAX_FORWARDS: HeaderName = HeaderName::from_lowercase_str("max-forwards");
122+
123+
/// The `Pragma` Header
124+
pub const PRAGMA: HeaderName = HeaderName::from_lowercase_str("pragma");
125+
126+
/// The `Proxy-Authenticate` Header
127+
pub const PROXY_AUTHENTICATE: HeaderName = HeaderName::from_lowercase_str("proxy-authenticate");
128+
/// The `Proxy-Authorization` Header
129+
pub const PROXY_AUTHORIZATION: HeaderName = HeaderName::from_lowercase_str("proxy-authorization");
130+
131+
/// The `Referer` Header
132+
pub const REFERER: HeaderName = HeaderName::from_lowercase_str("referer");
133+
134+
/// The `Retry-After` Header
135+
pub const RETRY_AFTER: HeaderName = HeaderName::from_lowercase_str("retry-after");
136+
137+
/// The `Server` Header
138+
pub const SERVER: HeaderName = HeaderName::from_lowercase_str("server");
139+
140+
/// The `Te` Header
141+
pub const TE: HeaderName = HeaderName::from_lowercase_str("te");
142+
143+
/// The `Trailer` Header
144+
pub const TRAILER: HeaderName = HeaderName::from_lowercase_str("trailer");
145+
146+
/// The `Upgrade` Header
147+
pub const UPGRADE: HeaderName = HeaderName::from_lowercase_str("upgrade");
148+
149+
/// The `User-Agent` Header
150+
pub const USER_AGENT: HeaderName = HeaderName::from_lowercase_str("user-agent");
151+
152+
/// The `Vary` Header
153+
pub const VARY: HeaderName = HeaderName::from_lowercase_str("vary");
154+
155+
/// The `Via` Header
156+
pub const VIA: HeaderName = HeaderName::from_lowercase_str("via");
157+
158+
/// The `Warning` Header
159+
pub const WARNING: HeaderName = HeaderName::from_lowercase_str("warning");
160+
161+
/// The `WWW-Authenticate` Header
162+
pub const WWW_AUTHENTICATE: HeaderName = HeaderName::from_lowercase_str("www-authenticate");

0 commit comments

Comments
 (0)