TensorFlow Serving C++ API Documentation
header_names.h
1 /* Copyright 2018 Google Inc. All Rights Reserved.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 
7  http://www.apache.org/licenses/LICENSE-2.0
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ==============================================================================*/
15 
16 #ifndef TENSORFLOW_SERVING_UTIL_NET_HTTP_PUBLIC_HEADER_NAMES_H_
17 #define TENSORFLOW_SERVING_UTIL_NET_HTTP_PUBLIC_HEADER_NAMES_H_
18 
19 namespace tensorflow {
20 namespace serving {
21 namespace net_http {
22 
23 // Standard HTTP Header Names
24 //
25 // http://www.iana.org/assignments/message-headers
26 class HTTPHeaders {
27  public:
28  HTTPHeaders() = delete;
29 
30  static const char ACCEPT[];
31  static const char ACCEPT_CHARSET[];
32  static const char ACCEPT_ENCODING[];
33  static const char ACCEPT_LANGUAGE[];
34  static const char ACCEPT_RANGES[];
35  static const char ACCESS_CONTROL_ALLOW_CREDENTIALS[];
36  static const char ACCESS_CONTROL_ALLOW_HEADERS[];
37  static const char ACCESS_CONTROL_ALLOW_METHODS[];
38  static const char ACCESS_CONTROL_ALLOW_ORIGIN[];
39  static const char ACCESS_CONTROL_EXPOSE_HEADERS[];
40  static const char ACCESS_CONTROL_MAX_AGE[];
41  static const char ACCESS_CONTROL_REQUEST_HEADERS[];
42  static const char ACCESS_CONTROL_REQUEST_METHOD[];
43  static const char AGE[];
44  static const char ALLOW[];
45  static const char AUTHORIZATION[];
46  static const char CACHE_CONTROL[];
47  static const char CONNECTION[];
48  static const char CONTENT_DISPOSITION[];
49  static const char CONTENT_ENCODING[];
50  static const char CONTENT_LANGUAGE[];
51  static const char CONTENT_LENGTH[];
52  static const char CONTENT_LOCATION[];
53  static const char CONTENT_RANGE[];
54  // http://w3.org/TR/CSP/#content-security-policy-header-field
55  static const char CONTENT_SECURITY_POLICY[];
56  // http://w3.org/TR/CSP/#content-security-policy-report-only-header-field
57  static const char CONTENT_SECURITY_POLICY_REPORT_ONLY[];
58  // A nonstandard CSP header that was introduced for CSP v.1
59  // https://www.w3.org/TR/2011/WD-CSP-20111129/ and used by the Firefox until
60  // version 23 and the Internet Explorer version 10.
61  // Please, use CONTENT_SECURITY_POLICY to pass the CSP.
62  static const char X_CONTENT_SECURITY_POLICY[];
63  // A nonstandard CSP header that was introduced for CSP v.1
64  // https://www.w3.org/TR/2011/WD-CSP-20111129/ and used by the Firefox until
65  // version 23 and Internet Explorer version 10.
66  // Please, use CONTENT_SECURITY_POLICY_REPORT_ONLY to pass the CSP.
67  static const char X_CONTENT_SECURITY_POLICY_REPORT_ONLY[];
68  // A nonstandard CSP header that was introduced for CSP v.1
69  // https://www.w3.org/TR/2011/WD-CSP-20111129/ and used by the Chrome until
70  // version 25. Please, use CONTENT_SECURITY_POLICY to pass the CSP.
71  static const char X_WEBKIT_CSP[];
72  // A nonstandard CSP header that was introduced for CSP v.1
73  // https://www.w3.org/TR/2011/WD-CSP-20111129/ and used by the Chrome until
74  // version 25.
75  // Please, use CONTENT_SECURITY_POLICY_REPORT_ONLY to pass the CSP.
76  static const char X_WEBKIT_CSP_REPORT_ONLY[];
77  static const char CONTENT_TYPE[];
78  static const char CONTENT_MD5[];
79  // A header, introduced by Microsoft, to modify how browsers
80  // interpret Content-Type:
81  // http://blogs.msdn.com/ie/archive/2008/09/02/ie8-security-part-vi-beta-2-update.aspx
82  static const char X_CONTENT_TYPE_OPTIONS[];
83  static const char COOKIE[];
84  static const char COOKIE2[];
85  static const char DATE[];
86  static const char DAV[];
87  static const char DEPTH[];
88  static const char DESTINATION[];
89  static const char DNT[];
90  // https://tools.ietf.org/html/rfc8470
91  static const char EARLY_DATA[];
92  static const char ETAG[];
93  static const char EXPECT[];
94  static const char EXPIRES[];
95  static const char FOLLOW_ONLY_WHEN_PRERENDER_SHOWN[];
96  // Supersedes X-Forwarded-For (https://tools.ietf.org/html/rfc7239).
97  static const char FORWARDED[];
98  static const char FROM[];
99  static const char HOST[];
100  // http://httpwg.org/specs/rfc7540.html#Http2SettingsHeader
101  static const char HTTP2_SETTINGS[];
102  static const char IF[];
103  static const char IF_MATCH[];
104  static const char IF_MODIFIED_SINCE[];
105  static const char IF_NONE_MATCH[];
106  static const char IF_RANGE[];
107  static const char IF_UNMODIFIED_SINCE[];
108  static const char KEEP_ALIVE[];
109  static const char LABEL[];
110  static const char LAST_MODIFIED[];
111  static const char LINK[];
112  static const char LOCATION[];
113  static const char LOCK_TOKEN[];
114  static const char MAX_FORWARDS[];
115  static const char MS_AUTHOR_VIA[];
116  static const char ORIGIN[];
117  static const char OVERWRITE_HDR[];
118  static const char P3P[];
119  // http://html.spec.whatwg.org/multipage/semantics.html#hyperlink-auditing
120  static const char PING_FROM[];
121  // http://html.spec.whatwg.org/multipage/semantics.html#hyperlink-auditing
122  static const char PING_TO[];
123  static const char PRAGMA[];
124  static const char PROXY_CONNECTION[];
125  static const char PROXY_AUTHENTICATE[];
126  static const char PROXY_AUTHORIZATION[];
127  // http://tools.ietf.org/html/draft-ietf-websec-key-pinning
128  static const char PUBLIC_KEY_PINS[];
129  static const char PUBLIC_KEY_PINS_REPORT_ONLY[];
130  static const char RANGE[];
131  static const char REFERER[];
132  // https://www.w3.org/TR/referrer-policy/
133  static const char REFERRER_POLICY[];
134  static const char REFERRER_POLICY_NO_REFERRER[];
135  static const char REFERRER_POLICY_NO_REFFERER_WHEN_DOWNGRADE[];
136  static const char REFERRER_POLICY_SAME_ORIGIN[];
137  static const char REFERRER_POLICY_ORIGIN[];
138  static const char REFERRER_POLICY_STRICT_ORIGIN[];
139  static const char REFERRER_POLICY_ORIGIN_WHEN_CROSS_ORIGIN[];
140  static const char REFERRER_POLICY_STRICT_ORIGIN_WHEN_CROSS_ORIGIN[];
141  static const char REFERRER_POLICY_UNSAFE_URL[];
142  static const char REFRESH[];
143  static const char RETRY_AFTER[];
144  // https://github.com/mikewest/sec-metadata
145  static const char SEC_METADATA[];
146  // https://tools.ietf.org/html/draft-ietf-tokbind-https
147  static const char SEC_TOKEN_BINDING[];
148  // https://tools.ietf.org/html/draft-ietf-tokbind-ttrp
149  static const char SEC_PROVIDED_TOKEN_BINDING_ID[];
150  static const char SEC_REFERRED_TOKEN_BINDING_ID[];
151  static const char SERVER[];
152  // https://www.w3.org/TR/server-timing/
153  static const char SERVER_TIMING[];
154  // https://www.w3.org/TR/service-workers/#update-algorithm
155  static const char SERVICE_WORKER[];
156  static const char SERVICE_WORKER_ALLOWED[];
157  // https://developers.google.com/web/updates/2017/02/navigation-preload
158  static const char SERVICE_WORKER_NAVIGATION_PRELOAD[];
159  static const char SET_COOKIE[];
160  static const char SET_COOKIE2[];
161  static const char STATUS_URI[];
162  // HSTS http://tools.ietf.org/html/draft-ietf-websec-strict-transport-sec
163  static const char STRICT_TRANSPORT_SECURITY[];
164  static const char TIMEOUT[];
165  // http://www.w3.org/TR/2011/WD-resource-timing-20110524/#cross-origin-resources
166  static const char TIMING_ALLOW_ORIGIN[];
167  // http://www.w3.org/2011/tracking-protection/drafts/tracking-dnt.html#response-header-field
168  static const char TK[];
169  static const char TRAILER[];
170  static const char TRAILERS[];
171  static const char TRANSFER_ENCODING[];
172  static const char TRANSFER_ENCODING_ABBRV[];
173  static const char UPGRADE[];
174  static const char USER_AGENT[];
175  static const char VARY[];
176  static const char VIA[];
177  static const char WARNING[];
178  static const char WWW_AUTHENTICATE[];
179 };
180 
181 } // namespace net_http
182 } // namespace serving
183 } // namespace tensorflow
184 
185 #endif // TENSORFLOW_SERVING_UTIL_NET_HTTP_PUBLIC_HEADER_NAMES_H_