Files
GopherGate/target/doc/http/header/index.html
2026-02-26 12:00:21 -05:00

90 lines
29 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="HTTP header types"><title>http::header - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-ca0dd0c4.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="http" data-themes="" data-resource-suffix="" data-rustdoc-version="1.93.1 (01f6ddf75 2026-02-11) (Arch Linux rust 1:1.93.1-1)" data-channel="1.93.1" data-search-js="search-9e2438ea.js" data-stringdex-js="stringdex-a3946164.js" data-settings-js="settings-c38705f0.js" ><script src="../../static.files/storage-e2aeef58.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-a410ff4d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-263c88ec.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module header</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../http/index.html">http</a><span class="version">1.4.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module header</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#headername" title="`HeaderName`"><code>HeaderName</code></a><ul><li><a href="#limitations" title="Limitations">Limitations</a></li></ul></li><li><a href="#headermap" title="`HeaderMap`"><code>HeaderMap</code></a></li></ul><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate http</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../index.html">http</a></div><h1>Module <span>header</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/http/header/mod.rs.html#1-142">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>HTTP header types</p>
<p>The module provides <a href="struct.HeaderName.html" title="struct http::header::HeaderName"><code>HeaderName</code></a>, <a href="struct.HeaderMap.html" title="struct http::header::HeaderMap"><code>HeaderMap</code></a>, and a number of types
used for interacting with <code>HeaderMap</code>. These types allow representing both
HTTP/1 and HTTP/2 headers.</p>
<h2 id="headername"><a class="doc-anchor" href="#headername">§</a><code>HeaderName</code></h2>
<p>The <code>HeaderName</code> type represents both standard header names as well as
custom header names. The type handles the case insensitive nature of header
names and is used as the key portion of <code>HeaderMap</code>. Header names are
normalized to lower case. In other words, when creating a <code>HeaderName</code> with
a string, even if upper case characters are included, when getting a string
representation of the <code>HeaderName</code>, it will be all lower case. This allows
for faster <code>HeaderMap</code> comparison operations.</p>
<p>The internal representation is optimized to efficiently handle the cases
most commonly encountered when working with HTTP. Standard header names are
special cased and are represented internally as an enum. Short custom
headers will be stored directly in the <code>HeaderName</code> struct and will not
incur any allocation overhead, however longer strings will require an
allocation for storage.</p>
<h3 id="limitations"><a class="doc-anchor" href="#limitations">§</a>Limitations</h3>
<p><code>HeaderName</code> has a max length of 32,768 for header names. Attempting to
parse longer names will result in a panic.</p>
<h2 id="headermap"><a class="doc-anchor" href="#headermap">§</a><code>HeaderMap</code></h2>
<p>The <a href="struct.HeaderMap.html" title="struct http::header::HeaderMap"><code>HeaderMap</code></a> type is a specialized
<a href="https://en.wikipedia.org/wiki/Multimap">multimap</a> structure for storing
header names and values. It is designed specifically for efficient
manipulation of HTTP headers. It supports multiple values per header name
and provides specialized APIs for insertion, retrieval, and iteration.</p>
<p><a href="struct.HeaderMap.html" title="struct http::header::HeaderMap"><em>See also the <code>HeaderMap</code> type.</em></a></p>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Drain.html" title="struct http::header::Drain">Drain</a></dt><dd>A drain iterator for <code>HeaderMap</code>.</dd><dt><a class="struct" href="struct.GetAll.html" title="struct http::header::GetAll">GetAll</a></dt><dd>A view to all values stored in a single entry.</dd><dt><a class="struct" href="struct.HeaderMap.html" title="struct http::header::HeaderMap">Header<wbr>Map</a></dt><dd>A specialized <a href="https://en.wikipedia.org/wiki/Multimap">multimap</a> for
header names and values.</dd><dt><a class="struct" href="struct.HeaderName.html" title="struct http::header::HeaderName">Header<wbr>Name</a></dt><dd>Represents an HTTP header field name</dd><dt><a class="struct" href="struct.HeaderValue.html" title="struct http::header::HeaderValue">Header<wbr>Value</a></dt><dd>Represents an HTTP header field value.</dd><dt><a class="struct" href="struct.IntoIter.html" title="struct http::header::IntoIter">Into<wbr>Iter</a></dt><dd>An owning iterator over the entries of a <code>HeaderMap</code>.</dd><dt><a class="struct" href="struct.InvalidHeaderName.html" title="struct http::header::InvalidHeaderName">Invalid<wbr>Header<wbr>Name</a></dt><dd>A possible error when converting a <code>HeaderName</code> from another type.</dd><dt><a class="struct" href="struct.InvalidHeaderValue.html" title="struct http::header::InvalidHeaderValue">Invalid<wbr>Header<wbr>Value</a></dt><dd>A possible error when converting a <code>HeaderValue</code> from a string or byte
slice.</dd><dt><a class="struct" href="struct.Iter.html" title="struct http::header::Iter">Iter</a></dt><dd><code>HeaderMap</code> entry iterator.</dd><dt><a class="struct" href="struct.IterMut.html" title="struct http::header::IterMut">IterMut</a></dt><dd><code>HeaderMap</code> mutable entry iterator</dd><dt><a class="struct" href="struct.Keys.html" title="struct http::header::Keys">Keys</a></dt><dd>An iterator over <code>HeaderMap</code> keys.</dd><dt><a class="struct" href="struct.MaxSizeReached.html" title="struct http::header::MaxSizeReached">MaxSize<wbr>Reached</a></dt><dd>Error returned when max capacity of <code>HeaderMap</code> is exceeded</dd><dt><a class="struct" href="struct.OccupiedEntry.html" title="struct http::header::OccupiedEntry">Occupied<wbr>Entry</a></dt><dd>A view into a single occupied location in a <code>HeaderMap</code>.</dd><dt><a class="struct" href="struct.ToStrError.html" title="struct http::header::ToStrError">ToStr<wbr>Error</a></dt><dd>A possible error when converting a <code>HeaderValue</code> to a string representation.</dd><dt><a class="struct" href="struct.VacantEntry.html" title="struct http::header::VacantEntry">Vacant<wbr>Entry</a></dt><dd>A view into a single empty location in a <code>HeaderMap</code>.</dd><dt><a class="struct" href="struct.ValueDrain.html" title="struct http::header::ValueDrain">Value<wbr>Drain</a></dt><dd>An drain iterator of all values associated with a single header name.</dd><dt><a class="struct" href="struct.ValueIter.html" title="struct http::header::ValueIter">Value<wbr>Iter</a></dt><dd>An iterator of all values associated with a single header name.</dd><dt><a class="struct" href="struct.ValueIterMut.html" title="struct http::header::ValueIterMut">Value<wbr>Iter<wbr>Mut</a></dt><dd>A mutable iterator of all values associated with a single header name.</dd><dt><a class="struct" href="struct.Values.html" title="struct http::header::Values">Values</a></dt><dd><code>HeaderMap</code> value iterator.</dd><dt><a class="struct" href="struct.ValuesMut.html" title="struct http::header::ValuesMut">Values<wbr>Mut</a></dt><dd><code>HeaderMap</code> mutable value iterator</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.Entry.html" title="enum http::header::Entry">Entry</a></dt><dd>A view into a single location in a <code>HeaderMap</code>, which may be vacant or occupied.</dd></dl><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><dl class="item-table"><dt><a class="constant" href="constant.ACCEPT.html" title="constant http::header::ACCEPT">ACCEPT</a></dt><dd>Advertises which content types the client is able to understand.</dd><dt><a class="constant" href="constant.ACCEPT_CHARSET.html" title="constant http::header::ACCEPT_CHARSET">ACCEPT_<wbr>CHARSET</a></dt><dd>Advertises which character set the client is able to understand.</dd><dt><a class="constant" href="constant.ACCEPT_ENCODING.html" title="constant http::header::ACCEPT_ENCODING">ACCEPT_<wbr>ENCODING</a></dt><dd>Advertises which content encoding the client is able to understand.</dd><dt><a class="constant" href="constant.ACCEPT_LANGUAGE.html" title="constant http::header::ACCEPT_LANGUAGE">ACCEPT_<wbr>LANGUAGE</a></dt><dd>Advertises which languages the client is able to understand.</dd><dt><a class="constant" href="constant.ACCEPT_RANGES.html" title="constant http::header::ACCEPT_RANGES">ACCEPT_<wbr>RANGES</a></dt><dd>Marker used by the server to advertise partial request support.</dd><dt><a class="constant" href="constant.ACCESS_CONTROL_ALLOW_CREDENTIALS.html" title="constant http::header::ACCESS_CONTROL_ALLOW_CREDENTIALS">ACCESS_<wbr>CONTROL_<wbr>ALLOW_<wbr>CREDENTIALS</a></dt><dd>Preflight response indicating if the response to the request can be
exposed to the page.</dd><dt><a class="constant" href="constant.ACCESS_CONTROL_ALLOW_HEADERS.html" title="constant http::header::ACCESS_CONTROL_ALLOW_HEADERS">ACCESS_<wbr>CONTROL_<wbr>ALLOW_<wbr>HEADERS</a></dt><dd>Preflight response indicating permitted HTTP headers.</dd><dt><a class="constant" href="constant.ACCESS_CONTROL_ALLOW_METHODS.html" title="constant http::header::ACCESS_CONTROL_ALLOW_METHODS">ACCESS_<wbr>CONTROL_<wbr>ALLOW_<wbr>METHODS</a></dt><dd>Preflight header response indicating permitted access methods.</dd><dt><a class="constant" href="constant.ACCESS_CONTROL_ALLOW_ORIGIN.html" title="constant http::header::ACCESS_CONTROL_ALLOW_ORIGIN">ACCESS_<wbr>CONTROL_<wbr>ALLOW_<wbr>ORIGIN</a></dt><dd>Indicates whether the response can be shared with resources with the
given origin.</dd><dt><a class="constant" href="constant.ACCESS_CONTROL_EXPOSE_HEADERS.html" title="constant http::header::ACCESS_CONTROL_EXPOSE_HEADERS">ACCESS_<wbr>CONTROL_<wbr>EXPOSE_<wbr>HEADERS</a></dt><dd>Indicates which headers can be exposed as part of the response by
listing their names.</dd><dt><a class="constant" href="constant.ACCESS_CONTROL_MAX_AGE.html" title="constant http::header::ACCESS_CONTROL_MAX_AGE">ACCESS_<wbr>CONTROL_<wbr>MAX_<wbr>AGE</a></dt><dd>Indicates how long the results of a preflight request can be cached.</dd><dt><a class="constant" href="constant.ACCESS_CONTROL_REQUEST_HEADERS.html" title="constant http::header::ACCESS_CONTROL_REQUEST_HEADERS">ACCESS_<wbr>CONTROL_<wbr>REQUEST_<wbr>HEADERS</a></dt><dd>Informs the server which HTTP headers will be used when an actual
request is made.</dd><dt><a class="constant" href="constant.ACCESS_CONTROL_REQUEST_METHOD.html" title="constant http::header::ACCESS_CONTROL_REQUEST_METHOD">ACCESS_<wbr>CONTROL_<wbr>REQUEST_<wbr>METHOD</a></dt><dd>Informs the server know which HTTP method will be used when the actual
request is made.</dd><dt><a class="constant" href="constant.AGE.html" title="constant http::header::AGE">AGE</a></dt><dd>Indicates the time in seconds the object has been in a proxy cache.</dd><dt><a class="constant" href="constant.ALLOW.html" title="constant http::header::ALLOW">ALLOW</a></dt><dd>Lists the set of methods support by a resource.</dd><dt><a class="constant" href="constant.ALT_SVC.html" title="constant http::header::ALT_SVC">ALT_SVC</a></dt><dd>Advertises the availability of alternate services to clients.</dd><dt><a class="constant" href="constant.AUTHORIZATION.html" title="constant http::header::AUTHORIZATION">AUTHORIZATION</a></dt><dd>Contains the credentials to authenticate a user agent with a server.</dd><dt><a class="constant" href="constant.CACHE_CONTROL.html" title="constant http::header::CACHE_CONTROL">CACHE_<wbr>CONTROL</a></dt><dd>Specifies directives for caching mechanisms in both requests and
responses.</dd><dt><a class="constant" href="constant.CACHE_STATUS.html" title="constant http::header::CACHE_STATUS">CACHE_<wbr>STATUS</a></dt><dd>Indicates how caches have handled a response and its corresponding request.</dd><dt><a class="constant" href="constant.CDN_CACHE_CONTROL.html" title="constant http::header::CDN_CACHE_CONTROL">CDN_<wbr>CACHE_<wbr>CONTROL</a></dt><dd>Specifies directives that allow origin servers to control the behavior of CDN caches
interposed between them and clients separately from other caches that might handle the
response.</dd><dt><a class="constant" href="constant.CONNECTION.html" title="constant http::header::CONNECTION">CONNECTION</a></dt><dd>Controls whether or not the network connection stays open after the
current transaction finishes.</dd><dt><a class="constant" href="constant.CONTENT_DISPOSITION.html" title="constant http::header::CONTENT_DISPOSITION">CONTENT_<wbr>DISPOSITION</a></dt><dd>Indicates if the content is expected to be displayed inline.</dd><dt><a class="constant" href="constant.CONTENT_ENCODING.html" title="constant http::header::CONTENT_ENCODING">CONTENT_<wbr>ENCODING</a></dt><dd>Used to compress the media-type.</dd><dt><a class="constant" href="constant.CONTENT_LANGUAGE.html" title="constant http::header::CONTENT_LANGUAGE">CONTENT_<wbr>LANGUAGE</a></dt><dd>Used to describe the languages intended for the audience.</dd><dt><a class="constant" href="constant.CONTENT_LENGTH.html" title="constant http::header::CONTENT_LENGTH">CONTENT_<wbr>LENGTH</a></dt><dd>Indicates the size of the entity-body.</dd><dt><a class="constant" href="constant.CONTENT_LOCATION.html" title="constant http::header::CONTENT_LOCATION">CONTENT_<wbr>LOCATION</a></dt><dd>Indicates an alternate location for the returned data.</dd><dt><a class="constant" href="constant.CONTENT_RANGE.html" title="constant http::header::CONTENT_RANGE">CONTENT_<wbr>RANGE</a></dt><dd>Indicates where in a full body message a partial message belongs.</dd><dt><a class="constant" href="constant.CONTENT_SECURITY_POLICY.html" title="constant http::header::CONTENT_SECURITY_POLICY">CONTENT_<wbr>SECURITY_<wbr>POLICY</a></dt><dd>Allows controlling resources the user agent is allowed to load for a
given page.</dd><dt><a class="constant" href="constant.CONTENT_SECURITY_POLICY_REPORT_ONLY.html" title="constant http::header::CONTENT_SECURITY_POLICY_REPORT_ONLY">CONTENT_<wbr>SECURITY_<wbr>POLICY_<wbr>REPORT_<wbr>ONLY</a></dt><dd>Allows experimenting with policies by monitoring their effects.</dd><dt><a class="constant" href="constant.CONTENT_TYPE.html" title="constant http::header::CONTENT_TYPE">CONTENT_<wbr>TYPE</a></dt><dd>Used to indicate the media type of the resource.</dd><dt><a class="constant" href="constant.COOKIE.html" title="constant http::header::COOKIE">COOKIE</a></dt><dd>Contains stored HTTP cookies previously sent by the server with the
Set-Cookie header.</dd><dt><a class="constant" href="constant.DATE.html" title="constant http::header::DATE">DATE</a></dt><dd>Contains the date and time at which the message was originated.</dd><dt><a class="constant" href="constant.DNT.html" title="constant http::header::DNT">DNT</a></dt><dd>Indicates the clients tracking preference.</dd><dt><a class="constant" href="constant.ETAG.html" title="constant http::header::ETAG">ETAG</a></dt><dd>Identifier for a specific version of a resource.</dd><dt><a class="constant" href="constant.EXPECT.html" title="constant http::header::EXPECT">EXPECT</a></dt><dd>Indicates expectations that need to be fulfilled by the server in order
to properly handle the request.</dd><dt><a class="constant" href="constant.EXPIRES.html" title="constant http::header::EXPIRES">EXPIRES</a></dt><dd>Contains the date/time after which the response is considered stale.</dd><dt><a class="constant" href="constant.FORWARDED.html" title="constant http::header::FORWARDED">FORWARDED</a></dt><dd>Contains information from the client-facing side of proxy servers that
is altered or lost when a proxy is involved in the path of the request.</dd><dt><a class="constant" href="constant.FROM.html" title="constant http::header::FROM">FROM</a></dt><dd>Contains an Internet email address for a human user who controls the
requesting user agent.</dd><dt><a class="constant" href="constant.HOST.html" title="constant http::header::HOST">HOST</a></dt><dd>Specifies the domain name of the server and (optionally) the TCP port
number on which the server is listening.</dd><dt><a class="constant" href="constant.IF_MATCH.html" title="constant http::header::IF_MATCH">IF_<wbr>MATCH</a></dt><dd>Makes a request conditional based on the E-Tag.</dd><dt><a class="constant" href="constant.IF_MODIFIED_SINCE.html" title="constant http::header::IF_MODIFIED_SINCE">IF_<wbr>MODIFIED_<wbr>SINCE</a></dt><dd>Makes a request conditional based on the modification date.</dd><dt><a class="constant" href="constant.IF_NONE_MATCH.html" title="constant http::header::IF_NONE_MATCH">IF_<wbr>NONE_<wbr>MATCH</a></dt><dd>Makes a request conditional based on the E-Tag.</dd><dt><a class="constant" href="constant.IF_RANGE.html" title="constant http::header::IF_RANGE">IF_<wbr>RANGE</a></dt><dd>Makes a request conditional based on range.</dd><dt><a class="constant" href="constant.IF_UNMODIFIED_SINCE.html" title="constant http::header::IF_UNMODIFIED_SINCE">IF_<wbr>UNMODIFIED_<wbr>SINCE</a></dt><dd>Makes the request conditional based on the last modification date.</dd><dt><a class="constant" href="constant.LAST_MODIFIED.html" title="constant http::header::LAST_MODIFIED">LAST_<wbr>MODIFIED</a></dt><dd>The Last-Modified header contains the date and time when the origin believes
the resource was last modified.</dd><dt><a class="constant" href="constant.LINK.html" title="constant http::header::LINK">LINK</a></dt><dd>Allows the server to point an interested client to another resource
containing metadata about the requested resource.</dd><dt><a class="constant" href="constant.LOCATION.html" title="constant http::header::LOCATION">LOCATION</a></dt><dd>Indicates the URL to redirect a page to.</dd><dt><a class="constant" href="constant.MAX_FORWARDS.html" title="constant http::header::MAX_FORWARDS">MAX_<wbr>FORWARDS</a></dt><dd>Indicates the max number of intermediaries the request should be sent
through.</dd><dt><a class="constant" href="constant.ORIGIN.html" title="constant http::header::ORIGIN">ORIGIN</a></dt><dd>Indicates where a fetch originates from.</dd><dt><a class="constant" href="constant.PRAGMA.html" title="constant http::header::PRAGMA">PRAGMA</a></dt><dd>HTTP/1.0 header usually used for backwards compatibility.</dd><dt><a class="constant" href="constant.PROXY_AUTHENTICATE.html" title="constant http::header::PROXY_AUTHENTICATE">PROXY_<wbr>AUTHENTICATE</a></dt><dd>Defines the authentication method that should be used to gain access to
a proxy.</dd><dt><a class="constant" href="constant.PROXY_AUTHORIZATION.html" title="constant http::header::PROXY_AUTHORIZATION">PROXY_<wbr>AUTHORIZATION</a></dt><dd>Contains the credentials to authenticate a user agent to a proxy server.</dd><dt><a class="constant" href="constant.PUBLIC_KEY_PINS.html" title="constant http::header::PUBLIC_KEY_PINS">PUBLIC_<wbr>KEY_<wbr>PINS</a></dt><dd>Associates a specific cryptographic public key with a certain server.</dd><dt><a class="constant" href="constant.PUBLIC_KEY_PINS_REPORT_ONLY.html" title="constant http::header::PUBLIC_KEY_PINS_REPORT_ONLY">PUBLIC_<wbr>KEY_<wbr>PINS_<wbr>REPORT_<wbr>ONLY</a></dt><dd>Sends reports of pinning violation to the report-uri specified in the
header.</dd><dt><a class="constant" href="constant.RANGE.html" title="constant http::header::RANGE">RANGE</a></dt><dd>Indicates the part of a document that the server should return.</dd><dt><a class="constant" href="constant.REFERER.html" title="constant http::header::REFERER">REFERER</a></dt><dd>Contains the address of the previous web page from which a link to the
currently requested page was followed.</dd><dt><a class="constant" href="constant.REFERRER_POLICY.html" title="constant http::header::REFERRER_POLICY">REFERRER_<wbr>POLICY</a></dt><dd>Governs which referrer information should be included with requests
made.</dd><dt><a class="constant" href="constant.REFRESH.html" title="constant http::header::REFRESH">REFRESH</a></dt><dd>Informs the web browser that the current page or frame should be
refreshed.</dd><dt><a class="constant" href="constant.RETRY_AFTER.html" title="constant http::header::RETRY_AFTER">RETRY_<wbr>AFTER</a></dt><dd>The Retry-After response HTTP header indicates how long the user agent
should wait before making a follow-up request. There are two main cases
this header is used:</dd><dt><a class="constant" href="constant.SEC_WEBSOCKET_ACCEPT.html" title="constant http::header::SEC_WEBSOCKET_ACCEPT">SEC_<wbr>WEBSOCKET_<wbr>ACCEPT</a></dt><dd>The |Sec-WebSocket-Accept| header field is used in the WebSocket
opening handshake. It is sent from the server to the client to
confirm that the server is willing to initiate the WebSocket
connection.</dd><dt><a class="constant" href="constant.SEC_WEBSOCKET_EXTENSIONS.html" title="constant http::header::SEC_WEBSOCKET_EXTENSIONS">SEC_<wbr>WEBSOCKET_<wbr>EXTENSIONS</a></dt><dd>The |Sec-WebSocket-Extensions| header field is used in the WebSocket
opening handshake. It is initially sent from the client to the
server, and then subsequently sent from the server to the client, to
agree on a set of protocol-level extensions to use for the duration
of the connection.</dd><dt><a class="constant" href="constant.SEC_WEBSOCKET_KEY.html" title="constant http::header::SEC_WEBSOCKET_KEY">SEC_<wbr>WEBSOCKET_<wbr>KEY</a></dt><dd>The |Sec-WebSocket-Key| header field is used in the WebSocket opening
handshake. It is sent from the client to the server to provide part
of the information used by the server to prove that it received a
valid WebSocket opening handshake. This helps ensure that the server
does not accept connections from non-WebSocket clients (e.g., HTTP
clients) that are being abused to send data to unsuspecting WebSocket
servers.</dd><dt><a class="constant" href="constant.SEC_WEBSOCKET_PROTOCOL.html" title="constant http::header::SEC_WEBSOCKET_PROTOCOL">SEC_<wbr>WEBSOCKET_<wbr>PROTOCOL</a></dt><dd>The |Sec-WebSocket-Protocol| header field is used in the WebSocket
opening handshake. It is sent from the client to the server and back
from the server to the client to confirm the subprotocol of the
connection. This enables scripts to both select a subprotocol and be
sure that the server agreed to serve that subprotocol.</dd><dt><a class="constant" href="constant.SEC_WEBSOCKET_VERSION.html" title="constant http::header::SEC_WEBSOCKET_VERSION">SEC_<wbr>WEBSOCKET_<wbr>VERSION</a></dt><dd>The |Sec-WebSocket-Version| header field is used in the WebSocket
opening handshake. It is sent from the client to the server to
indicate the protocol version of the connection. This enables
servers to correctly interpret the opening handshake and subsequent
data being sent from the data, and close the connection if the server
cannot interpret that data in a safe manner.</dd><dt><a class="constant" href="constant.SERVER.html" title="constant http::header::SERVER">SERVER</a></dt><dd>Contains information about the software used by the origin server to
handle the request.</dd><dt><a class="constant" href="constant.SET_COOKIE.html" title="constant http::header::SET_COOKIE">SET_<wbr>COOKIE</a></dt><dd>Used to send cookies from the server to the user agent.</dd><dt><a class="constant" href="constant.STRICT_TRANSPORT_SECURITY.html" title="constant http::header::STRICT_TRANSPORT_SECURITY">STRICT_<wbr>TRANSPORT_<wbr>SECURITY</a></dt><dd>Tells the client to communicate with HTTPS instead of using HTTP.</dd><dt><a class="constant" href="constant.TE.html" title="constant http::header::TE">TE</a></dt><dd>Informs the server of transfer encodings willing to be accepted as part
of the response.</dd><dt><a class="constant" href="constant.TRAILER.html" title="constant http::header::TRAILER">TRAILER</a></dt><dd>Allows the sender to include additional fields at the end of chunked
messages.</dd><dt><a class="constant" href="constant.TRANSFER_ENCODING.html" title="constant http::header::TRANSFER_ENCODING">TRANSFER_<wbr>ENCODING</a></dt><dd>Specifies the form of encoding used to safely transfer the entity to the
client.</dd><dt><a class="constant" href="constant.UPGRADE.html" title="constant http::header::UPGRADE">UPGRADE</a></dt><dd>Used as part of the exchange to upgrade the protocol.</dd><dt><a class="constant" href="constant.UPGRADE_INSECURE_REQUESTS.html" title="constant http::header::UPGRADE_INSECURE_REQUESTS">UPGRADE_<wbr>INSECURE_<wbr>REQUESTS</a></dt><dd>Sends a signal to the server expressing the clients preference for an
encrypted and authenticated response.</dd><dt><a class="constant" href="constant.USER_AGENT.html" title="constant http::header::USER_AGENT">USER_<wbr>AGENT</a></dt><dd>Contains a string that allows identifying the requesting clients
software.</dd><dt><a class="constant" href="constant.VARY.html" title="constant http::header::VARY">VARY</a></dt><dd>Determines how to match future requests with cached responses.</dd><dt><a class="constant" href="constant.VIA.html" title="constant http::header::VIA">VIA</a></dt><dd>Added by proxies to track routing.</dd><dt><a class="constant" href="constant.WARNING.html" title="constant http::header::WARNING">WARNING</a></dt><dd>General HTTP header contains information about possible problems with
the status of the message.</dd><dt><a class="constant" href="constant.WWW_AUTHENTICATE.html" title="constant http::header::WWW_AUTHENTICATE">WWW_<wbr>AUTHENTICATE</a></dt><dd>Defines the authentication method that should be used to gain access to
a resource.</dd><dt><a class="constant" href="constant.X_CONTENT_TYPE_OPTIONS.html" title="constant http::header::X_CONTENT_TYPE_OPTIONS">X_<wbr>CONTENT_<wbr>TYPE_<wbr>OPTIONS</a></dt><dd>Marker used by the server to indicate that the MIME types advertised in
the <code>content-type</code> headers should not be changed and be followed.</dd><dt><a class="constant" href="constant.X_DNS_PREFETCH_CONTROL.html" title="constant http::header::X_DNS_PREFETCH_CONTROL">X_<wbr>DNS_<wbr>PREFETCH_<wbr>CONTROL</a></dt><dd>Controls DNS prefetching.</dd><dt><a class="constant" href="constant.X_FRAME_OPTIONS.html" title="constant http::header::X_FRAME_OPTIONS">X_<wbr>FRAME_<wbr>OPTIONS</a></dt><dd>Indicates whether or not a browser should be allowed to render a page in
a frame.</dd><dt><a class="constant" href="constant.X_XSS_PROTECTION.html" title="constant http::header::X_XSS_PROTECTION">X_<wbr>XSS_<wbr>PROTECTION</a></dt><dd>Stop pages from loading when an XSS attack is detected.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.AsHeaderName.html" title="trait http::header::AsHeaderName">AsHeader<wbr>Name</a></dt><dd>A marker trait used to identify values that can be used as search keys
to a <code>HeaderMap</code>.</dd><dt><a class="trait" href="trait.IntoHeaderName.html" title="trait http::header::IntoHeaderName">Into<wbr>Header<wbr>Name</a></dt><dd>A marker trait used to identify values that can be used as insert keys
to a <code>HeaderMap</code>.</dd></dl></section></div></main></body></html>