001/*
002 * Copyright (C) 2011 The Guava Authors
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
005 * in compliance with the License. You may obtain a copy of the License at
006 *
007 * http://www.apache.org/licenses/LICENSE-2.0
008 *
009 * Unless required by applicable law or agreed to in writing, software distributed under the License
010 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
011 * or implied. See the License for the specific language governing permissions and limitations under
012 * the License.
013 */
014
015package com.google.common.net;
016
017import com.google.common.annotations.GwtCompatible;
018
019/**
020 * Contains constant definitions for the HTTP header field names. See:
021 *
022 * <ul>
023 *   <li><a href="http://www.ietf.org/rfc/rfc2109.txt">RFC 2109</a>
024 *   <li><a href="http://www.ietf.org/rfc/rfc2183.txt">RFC 2183</a>
025 *   <li><a href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616</a>
026 *   <li><a href="http://www.ietf.org/rfc/rfc2965.txt">RFC 2965</a>
027 *   <li><a href="http://www.ietf.org/rfc/rfc5988.txt">RFC 5988</a>
028 * </ul>
029 *
030 * @author Kurt Alfred Kluever
031 * @since 11.0
032 */
033@GwtCompatible
034@ElementTypesAreNonnullByDefault
035public final class HttpHeaders {
036  private HttpHeaders() {}
037
038  // HTTP Request and Response header fields
039
040  /** The HTTP {@code Cache-Control} header field name. */
041  public static final String CACHE_CONTROL = "Cache-Control";
042  /** The HTTP {@code Content-Length} header field name. */
043  public static final String CONTENT_LENGTH = "Content-Length";
044  /** The HTTP {@code Content-Type} header field name. */
045  public static final String CONTENT_TYPE = "Content-Type";
046  /** The HTTP {@code Date} header field name. */
047  public static final String DATE = "Date";
048  /** The HTTP {@code Pragma} header field name. */
049  public static final String PRAGMA = "Pragma";
050  /** The HTTP {@code Via} header field name. */
051  public static final String VIA = "Via";
052  /** The HTTP {@code Warning} header field name. */
053  public static final String WARNING = "Warning";
054
055  // HTTP Request header fields
056
057  /** The HTTP {@code Accept} header field name. */
058  public static final String ACCEPT = "Accept";
059  /** The HTTP {@code Accept-Charset} header field name. */
060  public static final String ACCEPT_CHARSET = "Accept-Charset";
061  /** The HTTP {@code Accept-Encoding} header field name. */
062  public static final String ACCEPT_ENCODING = "Accept-Encoding";
063  /** The HTTP {@code Accept-Language} header field name. */
064  public static final String ACCEPT_LANGUAGE = "Accept-Language";
065  /** The HTTP {@code Access-Control-Request-Headers} header field name. */
066  public static final String ACCESS_CONTROL_REQUEST_HEADERS = "Access-Control-Request-Headers";
067  /** The HTTP {@code Access-Control-Request-Method} header field name. */
068  public static final String ACCESS_CONTROL_REQUEST_METHOD = "Access-Control-Request-Method";
069  /** The HTTP {@code Authorization} header field name. */
070  public static final String AUTHORIZATION = "Authorization";
071  /** The HTTP {@code Connection} header field name. */
072  public static final String CONNECTION = "Connection";
073  /** The HTTP {@code Cookie} header field name. */
074  public static final String COOKIE = "Cookie";
075  /**
076   * The HTTP <a href="https://fetch.spec.whatwg.org/#cross-origin-resource-policy-header">{@code
077   * Cross-Origin-Resource-Policy}</a> header field name.
078   *
079   * @since 28.0
080   */
081  public static final String CROSS_ORIGIN_RESOURCE_POLICY = "Cross-Origin-Resource-Policy";
082  /**
083   * The HTTP <a href="https://tools.ietf.org/html/rfc8470">{@code Early-Data}</a> header field
084   * name.
085   *
086   * @since 27.0
087   */
088  public static final String EARLY_DATA = "Early-Data";
089  /** The HTTP {@code Expect} header field name. */
090  public static final String EXPECT = "Expect";
091  /** The HTTP {@code From} header field name. */
092  public static final String FROM = "From";
093  /**
094   * The HTTP <a href="https://tools.ietf.org/html/rfc7239">{@code Forwarded}</a> header field name.
095   *
096   * @since 20.0
097   */
098  public static final String FORWARDED = "Forwarded";
099  /**
100   * The HTTP {@code Follow-Only-When-Prerender-Shown} header field name.
101   *
102   * @since 17.0
103   */
104  public static final String FOLLOW_ONLY_WHEN_PRERENDER_SHOWN = "Follow-Only-When-Prerender-Shown";
105  /** The HTTP {@code Host} header field name. */
106  public static final String HOST = "Host";
107  /**
108   * The HTTP <a href="https://tools.ietf.org/html/rfc7540#section-3.2.1">{@code HTTP2-Settings}
109   * </a> header field name.
110   *
111   * @since 24.0
112   */
113  public static final String HTTP2_SETTINGS = "HTTP2-Settings";
114  /** The HTTP {@code If-Match} header field name. */
115  public static final String IF_MATCH = "If-Match";
116  /** The HTTP {@code If-Modified-Since} header field name. */
117  public static final String IF_MODIFIED_SINCE = "If-Modified-Since";
118  /** The HTTP {@code If-None-Match} header field name. */
119  public static final String IF_NONE_MATCH = "If-None-Match";
120  /** The HTTP {@code If-Range} header field name. */
121  public static final String IF_RANGE = "If-Range";
122  /** The HTTP {@code If-Unmodified-Since} header field name. */
123  public static final String IF_UNMODIFIED_SINCE = "If-Unmodified-Since";
124  /** The HTTP {@code Last-Event-ID} header field name. */
125  public static final String LAST_EVENT_ID = "Last-Event-ID";
126  /** The HTTP {@code Max-Forwards} header field name. */
127  public static final String MAX_FORWARDS = "Max-Forwards";
128  /** The HTTP {@code Origin} header field name. */
129  public static final String ORIGIN = "Origin";
130  /**
131   * The HTTP <a href="https://github.com/WICG/origin-isolation">{@code Origin-Isolation}</a> header
132   * field name.
133   *
134   * @since 30.1
135   */
136  public static final String ORIGIN_ISOLATION = "Origin-Isolation";
137  /** The HTTP {@code Proxy-Authorization} header field name. */
138  public static final String PROXY_AUTHORIZATION = "Proxy-Authorization";
139  /** The HTTP {@code Range} header field name. */
140  public static final String RANGE = "Range";
141  /** The HTTP {@code Referer} header field name. */
142  public static final String REFERER = "Referer";
143  /**
144   * The HTTP <a href="https://www.w3.org/TR/referrer-policy/">{@code Referrer-Policy}</a> header
145   * field name.
146   *
147   * @since 23.4
148   */
149  public static final String REFERRER_POLICY = "Referrer-Policy";
150
151  /**
152   * Values for the <a href="https://www.w3.org/TR/referrer-policy/">{@code Referrer-Policy}</a>
153   * header.
154   *
155   * @since 23.4
156   */
157  public static final class ReferrerPolicyValues {
158    private ReferrerPolicyValues() {}
159
160    public static final String NO_REFERRER = "no-referrer";
161    public static final String NO_REFFERER_WHEN_DOWNGRADE = "no-referrer-when-downgrade";
162    public static final String SAME_ORIGIN = "same-origin";
163    public static final String ORIGIN = "origin";
164    public static final String STRICT_ORIGIN = "strict-origin";
165    public static final String ORIGIN_WHEN_CROSS_ORIGIN = "origin-when-cross-origin";
166    public static final String STRICT_ORIGIN_WHEN_CROSS_ORIGIN = "strict-origin-when-cross-origin";
167    public static final String UNSAFE_URL = "unsafe-url";
168  }
169
170  /**
171   * The HTTP <a href="https://www.w3.org/TR/service-workers/#update-algorithm">{@code
172   * Service-Worker}</a> header field name.
173   *
174   * @since 20.0
175   */
176  public static final String SERVICE_WORKER = "Service-Worker";
177  /** The HTTP {@code TE} header field name. */
178  public static final String TE = "TE";
179  /** The HTTP {@code Upgrade} header field name. */
180  public static final String UPGRADE = "Upgrade";
181  /**
182   * The HTTP <a href="https://w3c.github.io/webappsec-upgrade-insecure-requests/#preference">{@code
183   * Upgrade-Insecure-Requests}</a> header field name.
184   *
185   * @since 28.1
186   */
187  public static final String UPGRADE_INSECURE_REQUESTS = "Upgrade-Insecure-Requests";
188
189  /** The HTTP {@code User-Agent} header field name. */
190  public static final String USER_AGENT = "User-Agent";
191
192  // HTTP Response header fields
193
194  /** The HTTP {@code Accept-Ranges} header field name. */
195  public static final String ACCEPT_RANGES = "Accept-Ranges";
196  /** The HTTP {@code Access-Control-Allow-Headers} header field name. */
197  public static final String ACCESS_CONTROL_ALLOW_HEADERS = "Access-Control-Allow-Headers";
198  /** The HTTP {@code Access-Control-Allow-Methods} header field name. */
199  public static final String ACCESS_CONTROL_ALLOW_METHODS = "Access-Control-Allow-Methods";
200  /** The HTTP {@code Access-Control-Allow-Origin} header field name. */
201  public static final String ACCESS_CONTROL_ALLOW_ORIGIN = "Access-Control-Allow-Origin";
202  /**
203   * The HTTP <a href="https://wicg.github.io/private-network-access/#headers">{@code
204   * Access-Control-Allow-Private-Network}</a> header field name.
205   *
206   * @since 31.1
207   */
208  public static final String ACCESS_CONTROL_ALLOW_PRIVATE_NETWORK =
209      "Access-Control-Allow-Private-Network";
210  /** The HTTP {@code Access-Control-Allow-Credentials} header field name. */
211  public static final String ACCESS_CONTROL_ALLOW_CREDENTIALS = "Access-Control-Allow-Credentials";
212  /** The HTTP {@code Access-Control-Expose-Headers} header field name. */
213  public static final String ACCESS_CONTROL_EXPOSE_HEADERS = "Access-Control-Expose-Headers";
214  /** The HTTP {@code Access-Control-Max-Age} header field name. */
215  public static final String ACCESS_CONTROL_MAX_AGE = "Access-Control-Max-Age";
216  /** The HTTP {@code Age} header field name. */
217  public static final String AGE = "Age";
218  /** The HTTP {@code Allow} header field name. */
219  public static final String ALLOW = "Allow";
220  /** The HTTP {@code Content-Disposition} header field name. */
221  public static final String CONTENT_DISPOSITION = "Content-Disposition";
222  /** The HTTP {@code Content-Encoding} header field name. */
223  public static final String CONTENT_ENCODING = "Content-Encoding";
224  /** The HTTP {@code Content-Language} header field name. */
225  public static final String CONTENT_LANGUAGE = "Content-Language";
226  /** The HTTP {@code Content-Location} header field name. */
227  public static final String CONTENT_LOCATION = "Content-Location";
228  /** The HTTP {@code Content-MD5} header field name. */
229  public static final String CONTENT_MD5 = "Content-MD5";
230  /** The HTTP {@code Content-Range} header field name. */
231  public static final String CONTENT_RANGE = "Content-Range";
232  /**
233   * The HTTP <a href="http://w3.org/TR/CSP/#content-security-policy-header-field">{@code
234   * Content-Security-Policy}</a> header field name.
235   *
236   * @since 15.0
237   */
238  public static final String CONTENT_SECURITY_POLICY = "Content-Security-Policy";
239  /**
240   * The HTTP <a href="http://w3.org/TR/CSP/#content-security-policy-report-only-header-field">
241   * {@code Content-Security-Policy-Report-Only}</a> header field name.
242   *
243   * @since 15.0
244   */
245  public static final String CONTENT_SECURITY_POLICY_REPORT_ONLY =
246      "Content-Security-Policy-Report-Only";
247  /**
248   * The HTTP nonstandard {@code X-Content-Security-Policy} header field name. It was introduced in
249   * <a href="https://www.w3.org/TR/2011/WD-CSP-20111129/">CSP v.1</a> and used by the Firefox until
250   * version 23 and the Internet Explorer version 10. Please, use {@link #CONTENT_SECURITY_POLICY}
251   * to pass the CSP.
252   *
253   * @since 20.0
254   */
255  public static final String X_CONTENT_SECURITY_POLICY = "X-Content-Security-Policy";
256  /**
257   * The HTTP nonstandard {@code X-Content-Security-Policy-Report-Only} header field name. It was
258   * introduced in <a href="https://www.w3.org/TR/2011/WD-CSP-20111129/">CSP v.1</a> and used by the
259   * Firefox until version 23 and the Internet Explorer version 10. Please, use {@link
260   * #CONTENT_SECURITY_POLICY_REPORT_ONLY} to pass the CSP.
261   *
262   * @since 20.0
263   */
264  public static final String X_CONTENT_SECURITY_POLICY_REPORT_ONLY =
265      "X-Content-Security-Policy-Report-Only";
266  /**
267   * The HTTP nonstandard {@code X-WebKit-CSP} header field name. It was introduced in <a
268   * href="https://www.w3.org/TR/2011/WD-CSP-20111129/">CSP v.1</a> and used by the Chrome until
269   * version 25. Please, use {@link #CONTENT_SECURITY_POLICY} to pass the CSP.
270   *
271   * @since 20.0
272   */
273  public static final String X_WEBKIT_CSP = "X-WebKit-CSP";
274  /**
275   * The HTTP nonstandard {@code X-WebKit-CSP-Report-Only} header field name. It was introduced in
276   * <a href="https://www.w3.org/TR/2011/WD-CSP-20111129/">CSP v.1</a> and used by the Chrome until
277   * version 25. Please, use {@link #CONTENT_SECURITY_POLICY_REPORT_ONLY} to pass the CSP.
278   *
279   * @since 20.0
280   */
281  public static final String X_WEBKIT_CSP_REPORT_ONLY = "X-WebKit-CSP-Report-Only";
282  /**
283   * The HTTP <a href="https://wicg.github.io/cross-origin-embedder-policy/#COEP">{@code
284   * Cross-Origin-Embedder-Policy}</a> header field name.
285   *
286   * @since 30.0
287   */
288  public static final String CROSS_ORIGIN_EMBEDDER_POLICY = "Cross-Origin-Embedder-Policy";
289  /**
290   * The HTTP <a href="https://wicg.github.io/cross-origin-embedder-policy/#COEP-RO">{@code
291   * Cross-Origin-Embedder-Policy-Report-Only}</a> header field name.
292   *
293   * @since 30.0
294   */
295  public static final String CROSS_ORIGIN_EMBEDDER_POLICY_REPORT_ONLY =
296      "Cross-Origin-Embedder-Policy-Report-Only";
297  /**
298   * The HTTP Cross-Origin-Opener-Policy header field name.
299   *
300   * @since 28.2
301   */
302  public static final String CROSS_ORIGIN_OPENER_POLICY = "Cross-Origin-Opener-Policy";
303  /** The HTTP {@code ETag} header field name. */
304  public static final String ETAG = "ETag";
305  /** The HTTP {@code Expires} header field name. */
306  public static final String EXPIRES = "Expires";
307  /** The HTTP {@code Last-Modified} header field name. */
308  public static final String LAST_MODIFIED = "Last-Modified";
309  /** The HTTP {@code Link} header field name. */
310  public static final String LINK = "Link";
311  /** The HTTP {@code Location} header field name. */
312  public static final String LOCATION = "Location";
313  /**
314   * The HTTP {@code Keep-Alive} header field name.
315   *
316   * @since 31.0
317   */
318  public static final String KEEP_ALIVE = "Keep-Alive";
319  /**
320   * The HTTP <a href="https://github.com/WICG/nav-speculation/blob/main/no-vary-search.md">{@code
321   * No-Vary-Seearch}</a> header field name.
322   *
323   * @since 32.0.0
324   */
325  public static final String NO_VARY_SEARCH = "No-Vary-Search";
326  /**
327   * The HTTP <a href="https://googlechrome.github.io/OriginTrials/#header">{@code Origin-Trial}</a>
328   * header field name.
329   *
330   * @since 27.1
331   */
332  public static final String ORIGIN_TRIAL = "Origin-Trial";
333  /** The HTTP {@code P3P} header field name. Limited browser support. */
334  public static final String P3P = "P3P";
335  /** The HTTP {@code Proxy-Authenticate} header field name. */
336  public static final String PROXY_AUTHENTICATE = "Proxy-Authenticate";
337  /** The HTTP {@code Refresh} header field name. Non-standard header supported by most browsers. */
338  public static final String REFRESH = "Refresh";
339  /**
340   * The HTTP <a href="https://www.w3.org/TR/reporting/">{@code Report-To}</a> header field name.
341   *
342   * @since 27.1
343   */
344  public static final String REPORT_TO = "Report-To";
345  /** The HTTP {@code Retry-After} header field name. */
346  public static final String RETRY_AFTER = "Retry-After";
347  /** The HTTP {@code Server} header field name. */
348  public static final String SERVER = "Server";
349  /**
350   * The HTTP <a href="https://www.w3.org/TR/server-timing/">{@code Server-Timing}</a> header field
351   * name.
352   *
353   * @since 23.6
354   */
355  public static final String SERVER_TIMING = "Server-Timing";
356  /**
357   * The HTTP <a href="https://www.w3.org/TR/service-workers/#update-algorithm">{@code
358   * Service-Worker-Allowed}</a> header field name.
359   *
360   * @since 20.0
361   */
362  public static final String SERVICE_WORKER_ALLOWED = "Service-Worker-Allowed";
363  /** The HTTP {@code Set-Cookie} header field name. */
364  public static final String SET_COOKIE = "Set-Cookie";
365  /** The HTTP {@code Set-Cookie2} header field name. */
366  public static final String SET_COOKIE2 = "Set-Cookie2";
367
368  /**
369   * The HTTP <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/SourceMap">{@code
370   * SourceMap}</a> header field name.
371   *
372   * @since 27.1
373   */
374  public static final String SOURCE_MAP = "SourceMap";
375
376  /**
377   * The HTTP <a href="https://github.com/WICG/nav-speculation/blob/main/opt-in.md">{@code
378   * Supports-Loading-Mode}</a> header field name. This can be used to specify, for example, <a
379   * href="https://developer.chrome.com/docs/privacy-sandbox/fenced-frame/#server-opt-in">fenced
380   * frames</a>.
381   *
382   * @since 32.0.0
383   */
384  public static final String SUPPORTS_LOADING_MODE = "Supports-Loading-Mode";
385
386  /**
387   * The HTTP <a href="http://tools.ietf.org/html/rfc6797#section-6.1">{@code
388   * Strict-Transport-Security}</a> header field name.
389   *
390   * @since 15.0
391   */
392  public static final String STRICT_TRANSPORT_SECURITY = "Strict-Transport-Security";
393  /**
394   * The HTTP <a href="http://www.w3.org/TR/resource-timing/#cross-origin-resources">{@code
395   * Timing-Allow-Origin}</a> header field name.
396   *
397   * @since 15.0
398   */
399  public static final String TIMING_ALLOW_ORIGIN = "Timing-Allow-Origin";
400  /** The HTTP {@code Trailer} header field name. */
401  public static final String TRAILER = "Trailer";
402  /** The HTTP {@code Transfer-Encoding} header field name. */
403  public static final String TRANSFER_ENCODING = "Transfer-Encoding";
404  /** The HTTP {@code Vary} header field name. */
405  public static final String VARY = "Vary";
406  /** The HTTP {@code WWW-Authenticate} header field name. */
407  public static final String WWW_AUTHENTICATE = "WWW-Authenticate";
408
409  // Common, non-standard HTTP header fields
410
411  /** The HTTP {@code DNT} header field name. */
412  public static final String DNT = "DNT";
413  /** The HTTP {@code X-Content-Type-Options} header field name. */
414  public static final String X_CONTENT_TYPE_OPTIONS = "X-Content-Type-Options";
415  /**
416   * The HTTP <a
417   * href="https://iabtechlab.com/wp-content/uploads/2019/06/VAST_4.2_final_june26.pdf">{@code
418   * X-Device-IP}</a> header field name. Header used for VAST requests to provide the IP address of
419   * the device on whose behalf the request is being made.
420   *
421   * @since 31.0
422   */
423  public static final String X_DEVICE_IP = "X-Device-IP";
424  /**
425   * The HTTP <a
426   * href="https://iabtechlab.com/wp-content/uploads/2019/06/VAST_4.2_final_june26.pdf">{@code
427   * X-Device-Referer}</a> header field name. Header used for VAST requests to provide the {@link
428   * #REFERER} header value that the on-behalf-of client would have used when making a request
429   * itself.
430   *
431   * @since 31.0
432   */
433  public static final String X_DEVICE_REFERER = "X-Device-Referer";
434  /**
435   * The HTTP <a
436   * href="https://iabtechlab.com/wp-content/uploads/2019/06/VAST_4.2_final_june26.pdf">{@code
437   * X-Device-Accept-Language}</a> header field name. Header used for VAST requests to provide the
438   * {@link #ACCEPT_LANGUAGE} header value that the on-behalf-of client would have used when making
439   * a request itself.
440   *
441   * @since 31.0
442   */
443  public static final String X_DEVICE_ACCEPT_LANGUAGE = "X-Device-Accept-Language";
444  /**
445   * The HTTP <a
446   * href="https://iabtechlab.com/wp-content/uploads/2019/06/VAST_4.2_final_june26.pdf">{@code
447   * X-Device-Requested-With}</a> header field name. Header used for VAST requests to provide the
448   * {@link #X_REQUESTED_WITH} header value that the on-behalf-of client would have used when making
449   * a request itself.
450   *
451   * @since 31.0
452   */
453  public static final String X_DEVICE_REQUESTED_WITH = "X-Device-Requested-With";
454  /** The HTTP {@code X-Do-Not-Track} header field name. */
455  public static final String X_DO_NOT_TRACK = "X-Do-Not-Track";
456  /** The HTTP {@code X-Forwarded-For} header field name (superseded by {@code Forwarded}). */
457  public static final String X_FORWARDED_FOR = "X-Forwarded-For";
458  /** The HTTP {@code X-Forwarded-Proto} header field name. */
459  public static final String X_FORWARDED_PROTO = "X-Forwarded-Proto";
460
461  /**
462   * The HTTP <a
463   * href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host">{@code
464   * X-Forwarded-Host}</a> header field name.
465   *
466   * @since 20.0
467   */
468  public static final String X_FORWARDED_HOST = "X-Forwarded-Host";
469
470  /**
471   * The HTTP <a
472   * href="https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/x-forwarded-headers.html#x-forwarded-port">{@code
473   * X-Forwarded-Port}</a> header field name.
474   *
475   * @since 20.0
476   */
477  public static final String X_FORWARDED_PORT = "X-Forwarded-Port";
478
479  /** The HTTP {@code X-Frame-Options} header field name. */
480  public static final String X_FRAME_OPTIONS = "X-Frame-Options";
481  /** The HTTP {@code X-Powered-By} header field name. */
482  public static final String X_POWERED_BY = "X-Powered-By";
483  /**
484   * The HTTP <a href="http://tools.ietf.org/html/draft-evans-palmer-key-pinning">{@code
485   * Public-Key-Pins}</a> header field name.
486   *
487   * @since 15.0
488   */
489  public static final String PUBLIC_KEY_PINS = "Public-Key-Pins";
490  /**
491   * The HTTP <a href="http://tools.ietf.org/html/draft-evans-palmer-key-pinning">{@code
492   * Public-Key-Pins-Report-Only}</a> header field name.
493   *
494   * @since 15.0
495   */
496  public static final String PUBLIC_KEY_PINS_REPORT_ONLY = "Public-Key-Pins-Report-Only";
497  /**
498   * The HTTP {@code X-Request-ID} header field name.
499   *
500   * @since 30.1
501   */
502  public static final String X_REQUEST_ID = "X-Request-ID";
503  /** The HTTP {@code X-Requested-With} header field name. */
504  public static final String X_REQUESTED_WITH = "X-Requested-With";
505  /** The HTTP {@code X-User-IP} header field name. */
506  public static final String X_USER_IP = "X-User-IP";
507
508  /**
509   * The HTTP <a
510   * href="https://learn.microsoft.com/en-us/archive/blogs/ieinternals/internet-explorer-and-custom-http-headers#:~:text=X%2DDownload%2DOptions">{@code
511   * X-Download-Options}</a> header field name.
512   *
513   * <p>When the new X-Download-Options header is present with the value {@code noopen}, the user is
514   * prevented from opening a file download directly; instead, they must first save the file
515   * locally.
516   *
517   * @since 24.1
518   */
519  public static final String X_DOWNLOAD_OPTIONS = "X-Download-Options";
520
521  /** The HTTP {@code X-XSS-Protection} header field name. */
522  public static final String X_XSS_PROTECTION = "X-XSS-Protection";
523  /**
524   * The HTTP <a
525   * href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-DNS-Prefetch-Control">{@code
526   * X-DNS-Prefetch-Control}</a> header controls DNS prefetch behavior. Value can be "on" or "off".
527   * By default, DNS prefetching is "on" for HTTP pages and "off" for HTTPS pages.
528   */
529  public static final String X_DNS_PREFETCH_CONTROL = "X-DNS-Prefetch-Control";
530  /**
531   * The HTTP <a href="http://html.spec.whatwg.org/multipage/semantics.html#hyperlink-auditing">
532   * {@code Ping-From}</a> header field name.
533   *
534   * @since 19.0
535   */
536  public static final String PING_FROM = "Ping-From";
537  /**
538   * The HTTP <a href="http://html.spec.whatwg.org/multipage/semantics.html#hyperlink-auditing">
539   * {@code Ping-To}</a> header field name.
540   *
541   * @since 19.0
542   */
543  public static final String PING_TO = "Ping-To";
544
545  /**
546   * The HTTP <a
547   * href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Link_prefetching_FAQ#As_a_server_admin.2C_can_I_distinguish_prefetch_requests_from_normal_requests.3F">{@code
548   * Purpose}</a> header field name.
549   *
550   * @since 28.0
551   */
552  public static final String PURPOSE = "Purpose";
553  /**
554   * The HTTP <a
555   * href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Link_prefetching_FAQ#As_a_server_admin.2C_can_I_distinguish_prefetch_requests_from_normal_requests.3F">{@code
556   * X-Purpose}</a> header field name.
557   *
558   * @since 28.0
559   */
560  public static final String X_PURPOSE = "X-Purpose";
561  /**
562   * The HTTP <a
563   * href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Link_prefetching_FAQ#As_a_server_admin.2C_can_I_distinguish_prefetch_requests_from_normal_requests.3F">{@code
564   * X-Moz}</a> header field name.
565   *
566   * @since 28.0
567   */
568  public static final String X_MOZ = "X-Moz";
569
570  /**
571   * The HTTP <a
572   * href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Device-Memory">{@code
573   * Device-Memory}</a> header field name.
574   *
575   * @since 31.0
576   */
577  public static final String DEVICE_MEMORY = "Device-Memory";
578
579  /**
580   * The HTTP <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Downlink">{@code
581   * Downlink}</a> header field name.
582   *
583   * @since 31.0
584   */
585  public static final String DOWNLINK = "Downlink";
586
587  /**
588   * The HTTP <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ECT">{@code
589   * ECT}</a> header field name.
590   *
591   * @since 31.0
592   */
593  public static final String ECT = "ECT";
594
595  /**
596   * The HTTP <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/RTT">{@code
597   * RTT}</a> header field name.
598   *
599   * @since 31.0
600   */
601  public static final String RTT = "RTT";
602
603  /**
604   * The HTTP <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Save-Data">{@code
605   * Save-Data}</a> header field name.
606   *
607   * @since 31.0
608   */
609  public static final String SAVE_DATA = "Save-Data";
610
611  /**
612   * The HTTP <a
613   * href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Viewport-Width">{@code
614   * Viewport-Width}</a> header field name.
615   *
616   * @since 31.0
617   */
618  public static final String VIEWPORT_WIDTH = "Viewport-Width";
619
620  /**
621   * The HTTP <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Width">{@code
622   * Width}</a> header field name.
623   *
624   * @since 31.0
625   */
626  public static final String WIDTH = "Width";
627
628  /**
629   * The HTTP <a href="https://www.w3.org/TR/permissions-policy-1/">{@code Permissions-Policy}</a>
630   * header field name.
631   *
632   * @since 31.0
633   */
634  public static final String PERMISSIONS_POLICY = "Permissions-Policy";
635
636  /**
637   * The HTTP <a
638   * href="https://w3c.github.io/webappsec-permissions-policy/#permissions-policy-report-only-http-header-field">{@code
639   * Permissions-Policy-Report-Only}</a> header field name.
640   *
641   * @since 33.2.0
642   */
643  public static final String PERMISSIONS_POLICY_REPORT_ONLY = "Permissions-Policy-Report-Only";
644
645  /**
646   * The HTTP <a
647   * href="https://wicg.github.io/user-preference-media-features-headers/#sec-ch-prefers-color-scheme">{@code
648   * Sec-CH-Prefers-Color-Scheme}</a> header field name.
649   *
650   * <p>This header is experimental.
651   *
652   * @since 31.0
653   */
654  public static final String SEC_CH_PREFERS_COLOR_SCHEME = "Sec-CH-Prefers-Color-Scheme";
655
656  /**
657   * The HTTP <a
658   * href="https://www.rfc-editor.org/rfc/rfc8942#name-the-accept-ch-response-head">{@code
659   * Accept-CH}</a> header field name.
660   *
661   * @since 31.0
662   */
663  public static final String ACCEPT_CH = "Accept-CH";
664  /**
665   * The HTTP <a
666   * href="https://datatracker.ietf.org/doc/html/draft-davidben-http-client-hint-reliability-03.txt#section-3">{@code
667   * Critical-CH}</a> header field name.
668   *
669   * @since 31.0
670   */
671  public static final String CRITICAL_CH = "Critical-CH";
672
673  /**
674   * The HTTP <a href="https://wicg.github.io/ua-client-hints/#sec-ch-ua">{@code Sec-CH-UA}</a>
675   * header field name.
676   *
677   * @since 30.0
678   */
679  public static final String SEC_CH_UA = "Sec-CH-UA";
680  /**
681   * The HTTP <a href="https://wicg.github.io/ua-client-hints/#sec-ch-ua-arch">{@code
682   * Sec-CH-UA-Arch}</a> header field name.
683   *
684   * @since 30.0
685   */
686  public static final String SEC_CH_UA_ARCH = "Sec-CH-UA-Arch";
687  /**
688   * The HTTP <a href="https://wicg.github.io/ua-client-hints/#sec-ch-ua-model">{@code
689   * Sec-CH-UA-Model}</a> header field name.
690   *
691   * @since 30.0
692   */
693  public static final String SEC_CH_UA_MODEL = "Sec-CH-UA-Model";
694  /**
695   * The HTTP <a href="https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform">{@code
696   * Sec-CH-UA-Platform}</a> header field name.
697   *
698   * @since 30.0
699   */
700  public static final String SEC_CH_UA_PLATFORM = "Sec-CH-UA-Platform";
701  /**
702   * The HTTP <a href="https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform-version">{@code
703   * Sec-CH-UA-Platform-Version}</a> header field name.
704   *
705   * @since 30.0
706   */
707  public static final String SEC_CH_UA_PLATFORM_VERSION = "Sec-CH-UA-Platform-Version";
708  /**
709   * The HTTP <a href="https://wicg.github.io/ua-client-hints/#sec-ch-ua-full-version">{@code
710   * Sec-CH-UA-Full-Version}</a> header field name.
711   *
712   * @deprecated Prefer {@link SEC_CH_UA_FULL_VERSION_LIST}.
713   * @since 30.0
714   */
715  @Deprecated public static final String SEC_CH_UA_FULL_VERSION = "Sec-CH-UA-Full-Version";
716  /**
717   * The HTTP <a href="https://wicg.github.io/ua-client-hints/#sec-ch-ua-full-version-list">{@code
718   * Sec-CH-UA-Full-Version}</a> header field name.
719   *
720   * @since 31.1
721   */
722  public static final String SEC_CH_UA_FULL_VERSION_LIST = "Sec-CH-UA-Full-Version-List";
723  /**
724   * The HTTP <a href="https://wicg.github.io/ua-client-hints/#sec-ch-ua-mobile">{@code
725   * Sec-CH-UA-Mobile}</a> header field name.
726   *
727   * @since 30.0
728   */
729  public static final String SEC_CH_UA_MOBILE = "Sec-CH-UA-Mobile";
730  /**
731   * The HTTP <a href="https://wicg.github.io/ua-client-hints/#sec-ch-ua-wow64">{@code
732   * Sec-CH-UA-WoW64}</a> header field name.
733   *
734   * @since 32.0.0
735   */
736  public static final String SEC_CH_UA_WOW64 = "Sec-CH-UA-WoW64";
737  /**
738   * The HTTP <a href="https://wicg.github.io/ua-client-hints/#sec-ch-ua-bitness">{@code
739   * Sec-CH-UA-Bitness}</a> header field name.
740   *
741   * @since 31.0
742   */
743  public static final String SEC_CH_UA_BITNESS = "Sec-CH-UA-Bitness";
744
745  /**
746   * The HTTP <a href="https://wicg.github.io/ua-client-hints/#sec-ch-ua-form-factor">{@code
747   * Sec-CH-UA-Form-Factor}</a> header field name.
748   *
749   * @deprecated Prefer {@link SEC_CH_UA_FORM_FACTORS}.
750   * @since 32.0.0
751   */
752  @Deprecated public static final String SEC_CH_UA_FORM_FACTOR = "Sec-CH-UA-Form-Factor";
753
754  /**
755   * The HTTP <a href="https://wicg.github.io/ua-client-hints/#sec-ch-ua-form-factors">{@code
756   * Sec-CH-UA-Form-Factors}</a> header field name.
757   *
758   * @since 33.3.0
759   */
760  public static final String SEC_CH_UA_FORM_FACTORS = "Sec-CH-UA-Form-Factors";
761
762  /**
763   * The HTTP <a
764   * href="https://wicg.github.io/responsive-image-client-hints/#sec-ch-viewport-width">{@code
765   * Sec-CH-Viewport-Width}</a> header field name.
766   *
767   * @since 32.0.0
768   */
769  public static final String SEC_CH_VIEWPORT_WIDTH = "Sec-CH-Viewport-Width";
770  /**
771   * The HTTP <a
772   * href="https://wicg.github.io/responsive-image-client-hints/#sec-ch-viewport-height">{@code
773   * Sec-CH-Viewport-Height}</a> header field name.
774   *
775   * @since 32.0.0
776   */
777  public static final String SEC_CH_VIEWPORT_HEIGHT = "Sec-CH-Viewport-Height";
778  /**
779   * The HTTP <a href="https://wicg.github.io/responsive-image-client-hints/#sec-ch-dpr">{@code
780   * Sec-CH-DPR}</a> header field name.
781   *
782   * @since 32.0.0
783   */
784  public static final String SEC_CH_DPR = "Sec-CH-DPR";
785  /**
786   * The HTTP <a href="https://w3c.github.io/webappsec-fetch-metadata/">{@code Sec-Fetch-Dest}</a>
787   * header field name.
788   *
789   * @since 27.1
790   */
791  public static final String SEC_FETCH_DEST = "Sec-Fetch-Dest";
792  /**
793   * The HTTP <a href="https://w3c.github.io/webappsec-fetch-metadata/">{@code Sec-Fetch-Mode}</a>
794   * header field name.
795   *
796   * @since 27.1
797   */
798  public static final String SEC_FETCH_MODE = "Sec-Fetch-Mode";
799  /**
800   * The HTTP <a href="https://w3c.github.io/webappsec-fetch-metadata/">{@code Sec-Fetch-Site}</a>
801   * header field name.
802   *
803   * @since 27.1
804   */
805  public static final String SEC_FETCH_SITE = "Sec-Fetch-Site";
806  /**
807   * The HTTP <a href="https://w3c.github.io/webappsec-fetch-metadata/">{@code Sec-Fetch-User}</a>
808   * header field name.
809   *
810   * @since 27.1
811   */
812  public static final String SEC_FETCH_USER = "Sec-Fetch-User";
813  /**
814   * The HTTP <a href="https://w3c.github.io/webappsec-fetch-metadata/">{@code Sec-Metadata}</a>
815   * header field name.
816   *
817   * @since 26.0
818   */
819  public static final String SEC_METADATA = "Sec-Metadata";
820  /**
821   * The HTTP <a href="https://tools.ietf.org/html/draft-ietf-tokbind-https">{@code
822   * Sec-Token-Binding}</a> header field name.
823   *
824   * @since 25.1
825   */
826  public static final String SEC_TOKEN_BINDING = "Sec-Token-Binding";
827  /**
828   * The HTTP <a href="https://tools.ietf.org/html/draft-ietf-tokbind-ttrp">{@code
829   * Sec-Provided-Token-Binding-ID}</a> header field name.
830   *
831   * @since 25.1
832   */
833  public static final String SEC_PROVIDED_TOKEN_BINDING_ID = "Sec-Provided-Token-Binding-ID";
834  /**
835   * The HTTP <a href="https://tools.ietf.org/html/draft-ietf-tokbind-ttrp">{@code
836   * Sec-Referred-Token-Binding-ID}</a> header field name.
837   *
838   * @since 25.1
839   */
840  public static final String SEC_REFERRED_TOKEN_BINDING_ID = "Sec-Referred-Token-Binding-ID";
841  /**
842   * The HTTP <a href="https://tools.ietf.org/html/rfc6455">{@code Sec-WebSocket-Accept}</a> header
843   * field name.
844   *
845   * @since 28.0
846   */
847  public static final String SEC_WEBSOCKET_ACCEPT = "Sec-WebSocket-Accept";
848  /**
849   * The HTTP <a href="https://tools.ietf.org/html/rfc6455">{@code Sec-WebSocket-Extensions}</a>
850   * header field name.
851   *
852   * @since 28.0
853   */
854  public static final String SEC_WEBSOCKET_EXTENSIONS = "Sec-WebSocket-Extensions";
855  /**
856   * The HTTP <a href="https://tools.ietf.org/html/rfc6455">{@code Sec-WebSocket-Key}</a> header
857   * field name.
858   *
859   * @since 28.0
860   */
861  public static final String SEC_WEBSOCKET_KEY = "Sec-WebSocket-Key";
862  /**
863   * The HTTP <a href="https://tools.ietf.org/html/rfc6455">{@code Sec-WebSocket-Protocol}</a>
864   * header field name.
865   *
866   * @since 28.0
867   */
868  public static final String SEC_WEBSOCKET_PROTOCOL = "Sec-WebSocket-Protocol";
869  /**
870   * The HTTP <a href="https://tools.ietf.org/html/rfc6455">{@code Sec-WebSocket-Version}</a> header
871   * field name.
872   *
873   * @since 28.0
874   */
875  public static final String SEC_WEBSOCKET_VERSION = "Sec-WebSocket-Version";
876  /**
877   * The HTTP <a href="https://patcg-individual-drafts.github.io/topics/">{@code
878   * Sec-Browsing-Topics}</a> header field name.
879   *
880   * @since 32.0.0
881   */
882  public static final String SEC_BROWSING_TOPICS = "Sec-Browsing-Topics";
883  /**
884   * The HTTP <a href="https://patcg-individual-drafts.github.io/topics/">{@code
885   * Observe-Browsing-Topics}</a> header field name.
886   *
887   * @since 32.0.0
888   */
889  public static final String OBSERVE_BROWSING_TOPICS = "Observe-Browsing-Topics";
890
891  /**
892   * The HTTP <a
893   * href="https://wicg.github.io/turtledove/#handling-direct-from-seller-signals">{@code
894   * Sec-Ad-Auction-Fetch}</a> header field name.
895   *
896   * @since 33.0.0
897   */
898  public static final String SEC_AD_AUCTION_FETCH = "Sec-Ad-Auction-Fetch";
899
900  /**
901   * The HTTP <a
902   * href="https://privacycg.github.io/gpc-spec/#the-sec-gpc-header-field-for-http-requests">{@code
903   * Sec-GPC}</a> header field name.
904   *
905   * @since 33.2.0
906   */
907  public static final String SEC_GPC = "Sec-GPC";
908
909  /**
910   * The HTTP <a
911   * href="https://wicg.github.io/turtledove/#handling-direct-from-seller-signals">{@code
912   * Ad-Auction-Signals}</a> header field name.
913   *
914   * @since 33.0.0
915   */
916  public static final String AD_AUCTION_SIGNALS = "Ad-Auction-Signals";
917
918  /**
919   * The HTTP <a href="https://wicg.github.io/turtledove/#http-headerdef-ad-auction-allowed">{@code
920   * Ad-Auction-Allowed}</a> header field name.
921   *
922   * @since 33.2.0
923   */
924  public static final String AD_AUCTION_ALLOWED = "Ad-Auction-Allowed";
925
926  /**
927   * The HTTP <a href="https://tools.ietf.org/html/rfc8586">{@code CDN-Loop}</a> header field name.
928   *
929   * @since 28.0
930   */
931  public static final String CDN_LOOP = "CDN-Loop";
932}