Skip to content
Open
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
2 changes: 2 additions & 0 deletions src/header/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ pub use self::name::{
MAX_FORWARDS,
ORIGIN,
PRAGMA,
PREFER,
PREFERENCE_APPLIED,
PROXY_AUTHENTICATE,
PROXY_AUTHORIZATION,
PUBLIC_KEY_PINS,
Expand Down
22 changes: 22 additions & 0 deletions src/header/name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,28 @@ standard_headers! {
/// Cache-Control HTTP/1.1 header is not yet present.
(Pragma, PRAGMA, b"pragma");

/// Influencing how a server processes a request without changing its
/// semantics is achieved through the Prefer request header, which
/// communicates optional processing preferences.
///
/// The Prefer header enables clients to express preferences about how a
/// server processes a request and constructs a response. Preferences are
/// advisory. A server is free to ignore any or all preferences without
/// causing the request to fail. When a server honors one or more
/// preferences, the Preference-Applied response header confirms which ones
/// were applied.
(Prefer, PREFER, b"prefer");

/// When a server honors optional behaviors from the Prefer request header,
/// the Preference-Applied response header confirms which preferences were
/// applied during processing.
///
/// The Preference-Applied header is part of the HTTP Prefer framework.
/// Clients use the Prefer request header to request optional behaviors
/// during request processing. The server responds with Preference-Applied
/// to confirm which preferences were applied.
(PreferenceApplied, PREFERENCE_APPLIED, b"preference-applied");

/// Defines the authentication method that should be used to gain access to
/// a proxy.
///
Expand Down