Skip to content

Commit

Permalink
Implement the Early-Data (RFC 8470) header
Browse files Browse the repository at this point in the history
  • Loading branch information
dasJ committed May 5, 2023
1 parent 3a2f3e0 commit 5416d22
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions benches/src/header_map/basic.rs
Expand Up @@ -551,6 +551,7 @@ const STD: &'static [HeaderName] = &[
COOKIE,
DNT,
DATE,
EARLY_DATA,
ETAG,
EXPECT,
EXPIRES,
Expand Down
1 change: 1 addition & 0 deletions src/header/mod.rs
Expand Up @@ -116,6 +116,7 @@ pub use self::name::{
COOKIE,
DNT,
DATE,
EARLY_DATA,
ETAG,
EXPECT,
EXPIRES,
Expand Down
3 changes: 3 additions & 0 deletions src/header/name.rs
Expand Up @@ -485,6 +485,9 @@ standard_headers! {
/// Contains the date and time at which the message was originated.
(Date, DATE, b"date");

/// Indicates that the request has been conveyed in early data and that a client understands the 425 (Too Early) status code.
(EarlyData, EARLY_DATA, b"early-data");

/// Identifier for a specific version of a resource.
///
/// This header allows caches to be more efficient, and saves bandwidth, as
Expand Down
1 change: 1 addition & 0 deletions tests/header_map.rs
Expand Up @@ -361,6 +361,7 @@ const STD: &'static [HeaderName] = &[
COOKIE,
DNT,
DATE,
EARLY_DATA,
ETAG,
EXPECT,
EXPIRES,
Expand Down
1 change: 1 addition & 0 deletions tests/header_map_fuzz.rs
Expand Up @@ -297,6 +297,7 @@ fn gen_header_name(g: &mut StdRng) -> HeaderName {
header::COOKIE,
header::DNT,
header::DATE,
header::EARLY_DATA,
header::ETAG,
header::EXPECT,
header::EXPIRES,
Expand Down

0 comments on commit 5416d22

Please sign in to comment.