Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/header/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ pub use self::name::{
AUTHORIZATION,
CACHE_CONTROL,
CONNECTION,
CONTENT_DIGEST,
CONTENT_DISPOSITION,
CONTENT_ENCODING,
CONTENT_LANGUAGE,
Expand Down Expand Up @@ -139,6 +140,7 @@ pub use self::name::{
REFERER,
REFERRER_POLICY,
REFRESH,
REPR_DIGEST,
RETRY_AFTER,
SEC_WEBSOCKET_ACCEPT,
SEC_WEBSOCKET_EXTENSIONS,
Expand All @@ -156,6 +158,8 @@ pub use self::name::{
USER_AGENT,
VARY,
VIA,
WANT_CONTENT_DIGEST,
WANT_REPR_DIGEST,
WARNING,
WWW_AUTHENTICATE,
X_CONTENT_TYPE_OPTIONS,
Expand Down
52 changes: 52 additions & 0 deletions src/header/name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,18 @@ standard_headers! {
/// is not mandatory.
(Connection, CONNECTION, "connection");

/// A cryptographic digest over the message contents.
///
/// For example:
///
/// ```
/// Content-Digest: sha-256=:4REjxQ4yrqUVicfSKYNO/cF9zNj5ANbzgDZt3/h3Qxo=:
/// ```
///
/// As this is a structured field (dictionary), multiple digests may be
/// specified. This header may be used in either requests or responses.
(ContentDigest, CONTENT_DIGEST, "content-digest");

/// Indicates if the content is expected to be displayed inline.
///
/// In a regular HTTP response, the Content-Disposition response header is a
Expand Down Expand Up @@ -778,6 +790,18 @@ standard_headers! {
/// refreshed.
(Refresh, REFRESH, "refresh");

/// A cryptographic digest over the "selected representation data."
///
/// For example:
///
/// ```
/// Repr-Digest: sha-256=:4REjxQ4yrqUVicfSKYNO/cF9zNj5ANbzgDZt3/h3Qxo=:
/// ```
///
/// As this is a structured field (dictionary), multiple digests may be
/// specified. This header may be used in either requests or responses.
(ReprDigest, REPR_DIGEST, "repr-digest");

/// 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:
Expand Down Expand Up @@ -902,6 +926,34 @@ standard_headers! {
/// request/response chain.
(Via, VIA, "via");

/// Indicates preference for a particular content digest algorithm.
///
/// For example:
///
/// ```
/// Want-Content-Digest: sha-512=3, sha-256=10, unixsum=0
/// ```
///
/// This dictionary structured field contains digest algorithms as keys
/// and the preference (`0`-`10`, inclusive) for that algorithm. `10`
/// indicates the most preferred algorithm and `0` indicates "not
/// acceptable".
(WantContentDigest, WANT_CONTENT_DIGEST, "want-content-digest");

/// Indicates preference for a particular representation digest algorithm.
///
/// For example:
///
/// ```
/// Want-Repr-Digest: sha-512=3, sha-256=10, unixsum=0
/// ```
///
/// This dictionary structured field contains digest algorithms as keys
/// and the preference (`0`-`10`, inclusive) for that algorithm. `10`
/// indicates the most preferred algorithm and `0` indicates "not
/// acceptable".
(WantReprDigest, WANT_REPR_DIGEST, "want-repr-digest");

/// General HTTP header contains information about possible problems with
/// the status of the message.
///
Expand Down