From de3743031f4df7a2936a75ed30531cd039294f83 Mon Sep 17 00:00:00 2001 From: tottoto Date: Wed, 22 Mar 2023 02:55:43 +0900 Subject: [PATCH 01/13] Remove bitflags (#135) --- Cargo.toml | 1 - src/common/cache_control.rs | 37 ++++++++++++++++++++++++++----------- src/lib.rs | 2 -- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b49c86e7..4fddd89a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,6 @@ members = [ http = "0.2.0" headers-core = { version = "0.2", path = "./headers-core" } base64 = "0.13" -bitflags = "1.0" bytes = "1" mime = "0.3.14" sha1 = "0.10" diff --git a/src/common/cache_control.rs b/src/common/cache_control.rs index 85e48fcb..afb69249 100644 --- a/src/common/cache_control.rs +++ b/src/common/cache_control.rs @@ -44,17 +44,32 @@ pub struct CacheControl { s_max_age: Option, } -bitflags! { - struct Flags: u32 { - const NO_CACHE = 0b000000001; - const NO_STORE = 0b000000010; - const NO_TRANSFORM = 0b000000100; - const ONLY_IF_CACHED = 0b000001000; - const MUST_REVALIDATE = 0b000010000; - const PUBLIC = 0b000100000; - const PRIVATE = 0b001000000; - const PROXY_REVALIDATE = 0b010000000; - const IMMUTABLE = 0b100000000; +#[derive(Debug, Clone, PartialEq)] +struct Flags { + bits: u64, +} + +impl Flags { + const NO_CACHE: Self = Self { bits: 0b000000001 }; + const NO_STORE: Self = Self { bits: 0b000000010 }; + const NO_TRANSFORM: Self = Self { bits: 0b000000100 }; + const ONLY_IF_CACHED: Self = Self { bits: 0b000001000 }; + const MUST_REVALIDATE: Self = Self { bits: 0b000010000 }; + const PUBLIC: Self = Self { bits: 0b000100000 }; + const PRIVATE: Self = Self { bits: 0b001000000 }; + const PROXY_REVALIDATE: Self = Self { bits: 0b010000000 }; + const IMMUTABLE: Self = Self { bits: 0b100000000 }; + + fn empty() -> Self { + Self { bits: 0 } + } + + fn contains(&self, flag: Self) -> bool { + (self.bits & flag.bits) != 0 + } + + fn insert(&mut self, flag: Self) { + self.bits |= flag.bits; } } diff --git a/src/lib.rs b/src/lib.rs index 0d27a810..971d5677 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -73,8 +73,6 @@ //! ``` extern crate base64; -#[macro_use] -extern crate bitflags; extern crate bytes; extern crate headers_core; extern crate http; From f01cc90cf8d601a716856bc9d29f47df92b779e4 Mon Sep 17 00:00:00 2001 From: tottoto Date: Fri, 21 Apr 2023 22:37:10 +0900 Subject: [PATCH 02/13] Update ci (#137) --- .github/workflows/ci.yml | 41 +++++++++------------------------------- 1 file changed, 9 insertions(+), 32 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22010924..fbd9179b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,52 +15,29 @@ jobs: rust: [stable, beta, nightly] steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - profile: minimal - override: true components: rustfmt - - - name: cargo test --all - uses: actions-rs/cargo@v1 - with: - command: test - args: --all - - name: cargo test --benches - if: matrix.rust == 'nightly' - uses: actions-rs/cargo@v1 - with: - command: test - args: --benches - + - run: cargo test --workspace + - if: matrix.rust == 'nightly' + run: cargo test --benches - name: Check minimal versions if: matrix.rust == 'nightly' run: | cargo clean cargo update -Z minimal-versions cargo check - - - name: cargo fmt --check - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - run: cargo fmt --all --check MSRV: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install rust ${{ env.minrust }} - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ env.minrust }} - profile: minimal - override: true - - - name: cargo build - uses: actions-rs/cargo@v1 - with: - command: build + - run: cargo build From c77c1f42bb70b42fac5852ae539dc831065a2b8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Wed, 30 Aug 2023 14:55:08 +0000 Subject: [PATCH 03/13] Raise msrv to 1.56 (#147) Necessary as httpdate 1.0.3 introduced MSRV, choosing 1.56 --- .github/workflows/ci.yml | 2 +- Cargo.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fbd9179b..50856fd1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: CI on: [push, pull_request] env: - minrust: 1.51.0 + minrust: 1.56.0 jobs: test: diff --git a/Cargo.toml b/Cargo.toml index 4fddd89a..c7246c94 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ repository = "https://github.com/hyperium/headers" authors = ["Sean McArthur "] keywords = ["http", "headers", "hyper", "hyperium"] categories = ["web-programming"] +rust-version = "1.56" [workspace] members = [ From a8b4181730224accd79ecf8074dd9ce0f5cae4be Mon Sep 17 00:00:00 2001 From: Ayush Date: Wed, 30 Aug 2023 20:29:38 +0530 Subject: [PATCH 04/13] Update base64 to 0.21 (#127) Signed-off-by: Ayush Singh Co-authored-by: Sean McArthur --- Cargo.toml | 2 +- src/common/authorization.rs | 8 +++++--- src/common/sec_websocket_accept.rs | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c7246c94..b0f31b65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ members = [ [dependencies] http = "0.2.0" headers-core = { version = "0.2", path = "./headers-core" } -base64 = "0.13" +base64 = "0.21.3" bytes = "1" mime = "0.3.14" sha1 = "0.10" diff --git a/src/common/authorization.rs b/src/common/authorization.rs index 734bc6e2..e62f2fd9 100644 --- a/src/common/authorization.rs +++ b/src/common/authorization.rs @@ -1,6 +1,7 @@ //! Authorization header and types. -use base64; +use base64::engine::general_purpose::STANDARD as ENGINE; +use base64::Engine; use bytes::Bytes; use util::HeaderValueString; @@ -158,7 +159,8 @@ impl Credentials for Basic { let bytes = &value.as_bytes()["Basic ".len()..]; let non_space_pos = bytes.iter().position(|b| *b != b' ')?; let bytes = &bytes[non_space_pos..]; - let bytes = base64::decode(bytes).ok()?; + + let bytes = ENGINE.decode(bytes).ok()?; let decoded = String::from_utf8(bytes).ok()?; @@ -169,7 +171,7 @@ impl Credentials for Basic { fn encode(&self) -> HeaderValue { let mut encoded = String::from("Basic "); - base64::encode_config_buf(&self.decoded, base64::STANDARD, &mut encoded); + ENGINE.encode_string(&self.decoded, &mut encoded); let bytes = Bytes::from(encoded); HeaderValue::from_maybe_shared(bytes) diff --git a/src/common/sec_websocket_accept.rs b/src/common/sec_websocket_accept.rs index 9e9176f0..89ec7c07 100644 --- a/src/common/sec_websocket_accept.rs +++ b/src/common/sec_websocket_accept.rs @@ -1,4 +1,5 @@ -use base64; +use base64::engine::general_purpose::STANDARD as ENGINE; +use base64::Engine; use bytes::Bytes; use sha1::{Digest, Sha1}; @@ -39,7 +40,7 @@ fn sign(key: &[u8]) -> SecWebsocketAccept { let mut sha1 = Sha1::default(); sha1.update(key); sha1.update(&b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11"[..]); - let b64 = Bytes::from(base64::encode(&sha1.finalize())); + let b64 = Bytes::from(ENGINE.encode(&sha1.finalize())); let val = ::HeaderValue::from_maybe_shared(b64).expect("base64 is a valid value"); From 2b9fc5be92f0346482aa6d09917a434a56ade3f3 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Thu, 31 Aug 2023 10:37:55 -0400 Subject: [PATCH 05/13] headers:v0.3.9 --- Cargo.toml | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b0f31b65..65435b57 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "headers" -version = "0.3.8" # don't forget to update html_root_url +version = "0.3.9" # don't forget to update html_root_url description = "typed HTTP headers" license = "MIT" readme = "README.md" diff --git a/src/lib.rs b/src/lib.rs index 971d5677..7d1ddaed 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,7 +2,7 @@ #![deny(missing_debug_implementations)] #![cfg_attr(test, deny(warnings))] #![cfg_attr(all(test, feature = "nightly"), feature(test))] -#![doc(html_root_url = "https://docs.rs/headers/0.3.8")] +#![doc(html_root_url = "https://docs.rs/headers/0.3.9")] //! # Typed HTTP Headers //! From a3f982792dc5200bc8c8ec64879102b2dcc02159 Mon Sep 17 00:00:00 2001 From: bc-universe <9028220+bc-universe@users.noreply.github.com> Date: Fri, 3 Nov 2023 20:37:58 +0100 Subject: [PATCH 06/13] Add support for "must-understand" directive (#149) * Add support for "must-understand" directive * Address fmt issues --- src/common/cache_control.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/common/cache_control.rs b/src/common/cache_control.rs index afb69249..7d5db055 100644 --- a/src/common/cache_control.rs +++ b/src/common/cache_control.rs @@ -59,6 +59,7 @@ impl Flags { const PRIVATE: Self = Self { bits: 0b001000000 }; const PROXY_REVALIDATE: Self = Self { bits: 0b010000000 }; const IMMUTABLE: Self = Self { bits: 0b100000000 }; + const MUST_UNDERSTAND: Self = Self { bits: 0b1000000000 }; fn empty() -> Self { Self { bits: 0 } @@ -121,6 +122,10 @@ impl CacheControl { pub fn immutable(&self) -> bool { self.flags.contains(Flags::IMMUTABLE) } + /// Check if the `must_understand` directive is set. + pub fn must_understand(&self) -> bool { + self.flags.contains(Flags::MUST_UNDERSTAND) + } /// Get the value of the `max-age` directive if set. pub fn max_age(&self) -> Option { @@ -186,6 +191,11 @@ impl CacheControl { self } + /// Set the `must_understand` directive. + pub fn with_must_understand(mut self) -> Self { + self.flags.insert(Flags::MUST_UNDERSTAND); + self + } /// Set the `max-age` directive. pub fn with_max_age(mut self, duration: Duration) -> Self { self.max_age = Some(duration.into()); @@ -258,6 +268,9 @@ impl FromIterator for FromIter { Directive::MustRevalidate => { cc.flags.insert(Flags::MUST_REVALIDATE); } + Directive::MustUnderstand => { + cc.flags.insert(Flags::MUST_UNDERSTAND); + } Directive::Public => { cc.flags.insert(Flags::PUBLIC); } @@ -310,6 +323,7 @@ impl<'a> fmt::Display for Fmt<'a> { if_flag(Flags::PUBLIC, Directive::Public), if_flag(Flags::PRIVATE, Directive::Private), if_flag(Flags::IMMUTABLE, Directive::Immutable), + if_flag(Flags::MUST_UNDERSTAND, Directive::MustUnderstand), if_flag(Flags::PROXY_REVALIDATE, Directive::ProxyRevalidate), self.0 .max_age @@ -355,6 +369,7 @@ enum Directive { // response directives MustRevalidate, + MustUnderstand, Public, Private, Immutable, @@ -376,6 +391,7 @@ impl fmt::Display for Directive { Directive::MinFresh(secs) => return write!(f, "min-fresh={}", secs), Directive::MustRevalidate => "must-revalidate", + Directive::MustUnderstand => "must-understand", Directive::Public => "public", Directive::Private => "private", Directive::Immutable => "immutable", @@ -399,6 +415,7 @@ impl FromStr for KnownDirective { "public" => Directive::Public, "private" => Directive::Private, "immutable" => Directive::Immutable, + "must-understand" => Directive::MustUnderstand, "proxy-revalidate" => Directive::ProxyRevalidate, "" => return Err(()), _ => match s.find('=') { @@ -472,6 +489,18 @@ mod tests { assert!(cc.immutable()); } + #[test] + fn test_must_understand() { + let cc = CacheControl::new().with_must_understand(); + let headers = test_encode(cc.clone()); + assert_eq!(headers["cache-control"], "must-understand"); + assert_eq!( + test_decode::(&["must-understand"]).unwrap(), + cc + ); + assert!(cc.must_understand()); + } + #[test] fn test_parse_bad_syntax() { assert_eq!(test_decode::(&["max-age=lolz"]), None); From 4400aa90c47a78a41be5f394bc19f420e2c0244a Mon Sep 17 00:00:00 2001 From: Chrislearn Young Date: Thu, 16 Nov 2023 09:30:53 +0800 Subject: [PATCH 07/13] Update to http 1.0 (#151) --- Cargo.toml | 2 +- headers-core/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 65435b57..5037d069 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ members = [ ] [dependencies] -http = "0.2.0" +http = "1.0.0" headers-core = { version = "0.2", path = "./headers-core" } base64 = "0.21.3" bytes = "1" diff --git a/headers-core/Cargo.toml b/headers-core/Cargo.toml index 22c011f1..23f2556d 100644 --- a/headers-core/Cargo.toml +++ b/headers-core/Cargo.toml @@ -10,4 +10,4 @@ authors = ["Sean McArthur "] keywords = ["http", "headers", "hyper", "hyperium"] [dependencies] -http = "0.2.0" +http = "1.0.0" From 7d784cdf78f0a9fed82f2902041b17f66be3ef76 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Mon, 20 Nov 2023 06:14:28 -0800 Subject: [PATCH 08/13] Make authorization schemes case and whitespace insensitive (#153) * Make authorization schemes case and whitespace insensitive According to RFC7235[1]: > It uses a case- > insensitive token as a means to identify the authentication scheme, > followed by additional information necessary for achieving > authentication via that scheme. [1]: https://datatracker.ietf.org/doc/html/rfc7235#section-2.1 * Use eq_ignore_ascii_case() for Authorization schemes This is effectively the same as comparing the result of `to_ascii_lowercase()`, with the benefit of avoiding "allocating and copying temporaries" (according to the Rust `std` docs[1]). [1]: https://doc.rust-lang.org/std/primitive.slice.html#method.eq_ignore_ascii_case --------- Co-authored-by: Simon Bihel --- src/common/authorization.rs | 38 ++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/src/common/authorization.rs b/src/common/authorization.rs index e62f2fd9..bb2c35ec 100644 --- a/src/common/authorization.rs +++ b/src/common/authorization.rs @@ -82,9 +82,9 @@ impl ::Header for Authorization { .next() .and_then(|val| { let slice = val.as_bytes(); - if slice.starts_with(C::SCHEME.as_bytes()) - && slice.len() > C::SCHEME.len() + if slice.len() > C::SCHEME.len() && slice[C::SCHEME.len()] == b' ' + && slice[..C::SCHEME.len()].eq_ignore_ascii_case(C::SCHEME.as_bytes()) { C::decode(val).map(Authorization) } else { @@ -151,7 +151,7 @@ impl Credentials for Basic { fn decode(value: &HeaderValue) -> Option { debug_assert!( - value.as_bytes().starts_with(b"Basic "), + value.as_bytes()[..Self::SCHEME.len()].eq_ignore_ascii_case(Self::SCHEME.as_bytes()), "HeaderValue to decode should start with \"Basic ..\", received = {:?}", value, ); @@ -186,7 +186,7 @@ pub struct Bearer(HeaderValueString); impl Bearer { /// View the token part as a `&str`. pub fn token(&self) -> &str { - &self.0.as_str()["Bearer ".len()..] + self.0.as_str()["Bearer ".len()..].trim_start() } } @@ -195,7 +195,7 @@ impl Credentials for Bearer { fn decode(value: &HeaderValue) -> Option { debug_assert!( - value.as_bytes().starts_with(b"Bearer "), + value.as_bytes()[..Self::SCHEME.len()].eq_ignore_ascii_case(Self::SCHEME.as_bytes()), "HeaderValue to decode should start with \"Bearer ..\", received = {:?}", value, ); @@ -252,6 +252,22 @@ mod tests { assert_eq!(auth.0.password(), "open sesame"); } + #[test] + fn basic_decode_case_insensitive() { + let auth: Authorization = + test_decode(&["basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="]).unwrap(); + assert_eq!(auth.0.username(), "Aladdin"); + assert_eq!(auth.0.password(), "open sesame"); + } + + #[test] + fn basic_decode_extra_whitespaces() { + let auth: Authorization = + test_decode(&["Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="]).unwrap(); + assert_eq!(auth.0.username(), "Aladdin"); + assert_eq!(auth.0.password(), "open sesame"); + } + #[test] fn basic_decode_no_password() { let auth: Authorization = test_decode(&["Basic QWxhZGRpbjo="]).unwrap(); @@ -273,6 +289,18 @@ mod tests { let auth: Authorization = test_decode(&["Bearer fpKL54jvWmEGVoRdCNjG"]).unwrap(); assert_eq!(auth.0.token().as_bytes(), b"fpKL54jvWmEGVoRdCNjG"); } + + #[test] + fn bearer_decode_case_insensitive() { + let auth: Authorization = test_decode(&["bearer fpKL54jvWmEGVoRdCNjG"]).unwrap(); + assert_eq!(auth.0.token().as_bytes(), b"fpKL54jvWmEGVoRdCNjG"); + } + + #[test] + fn bearer_decode_extra_whitespaces() { + let auth: Authorization = test_decode(&["Bearer fpKL54jvWmEGVoRdCNjG"]).unwrap(); + assert_eq!(auth.0.token().as_bytes(), b"fpKL54jvWmEGVoRdCNjG"); + } } //bench_header!(raw, Authorization, { vec![b"foo bar baz".to_vec()] }); From f2c4aba02044249cc6a3e224c9ff930fd0999ad3 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Fri, 24 Nov 2023 09:00:51 -0500 Subject: [PATCH 09/13] fix: Range suffixes are not Rust RangeTo (#155) An HTTP Range of `bytes=-100` means a suffix, the last 100 bytes. This was wrongly parsed as the Rust range `..100`, which means the first 100 bytes. This has been fixed, but doing so required change `Range::iter` to accept a length argument, to determine if the ranges are satisfiable. BREAKING CHANGE: Change `.iter()` calls to `.satisfiable_ranges(len)`. Also, the `Range::bytes()` constructor will now return an error if pass a `RangeTo` (e.g. `Range::bytes(..100)`). --- src/common/range.rs | 49 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/src/common/range.rs b/src/common/range.rs index 29cc79d3..6d35936d 100644 --- a/src/common/range.rs +++ b/src/common/range.rs @@ -48,29 +48,52 @@ impl Range { /// Creates a `Range` header from bounds. pub fn bytes(bounds: impl RangeBounds) -> Result { let v = match (bounds.start_bound(), bounds.end_bound()) { - (Bound::Unbounded, Bound::Included(end)) => format!("bytes=-{}", end), - (Bound::Unbounded, Bound::Excluded(&end)) => format!("bytes=-{}", end - 1), (Bound::Included(start), Bound::Included(end)) => format!("bytes={}-{}", start, end), (Bound::Included(start), Bound::Excluded(&end)) => { format!("bytes={}-{}", start, end - 1) } (Bound::Included(start), Bound::Unbounded) => format!("bytes={}-", start), + // These do not directly translate. + //(Bound::Unbounded, Bound::Included(end)) => format!("bytes=-{}", end), + //(Bound::Unbounded, Bound::Excluded(&end)) => format!("bytes=-{}", end - 1), _ => return Err(InvalidRange { _inner: () }), }; Ok(Range(::HeaderValue::from_str(&v).unwrap())) } - /// Iterate the range sets as a tuple of bounds. - pub fn iter<'a>(&'a self) -> impl Iterator, Bound)> + 'a { + /// Iterate the range sets as a tuple of bounds, if valid with length. + /// + /// The length of the content is passed as an argument, and all ranges + /// that can be satisfied will be iterated. + pub fn satisfiable_ranges<'a>( + &'a self, + len: u64, + ) -> impl Iterator, Bound)> + 'a { let s = self .0 .to_str() .expect("valid string checked in Header::decode()"); - s["bytes=".len()..].split(',').filter_map(|spec| { + s["bytes=".len()..].split(',').filter_map(move |spec| { let mut iter = spec.trim().splitn(2, '-'); - Some((parse_bound(iter.next()?)?, parse_bound(iter.next()?)?)) + let start = parse_bound(iter.next()?)?; + let end = parse_bound(iter.next()?)?; + + // Unbounded ranges in HTTP are actually a suffix + // For example, `-100` means the last 100 bytes. + if let Bound::Unbounded = start { + if let Bound::Included(end) = end { + if len < end { + // Last N bytes is larger than available! + return None; + } + return Some((Bound::Included(len - end), Bound::Unbounded)); + } + // else fall through + } + + Some((start, end)) }) } } @@ -416,3 +439,17 @@ fn test_byte_range_spec_to_satisfiable_range() { bench_header!(bytes_multi, Range, { vec![b"bytes=1-1001,2001-3001,10001-".to_vec()]}); bench_header!(custom_unit, Range, { vec![b"other=0-100000".to_vec()]}); */ + +#[test] +fn test_to_satisfiable_range_suffix() { + let range = super::test_decode::(&["bytes=-100"]).unwrap(); + let bounds = range.satisfiable_ranges(350).next().unwrap(); + assert_eq!(bounds, (Bound::Included(250), Bound::Unbounded)); +} + +#[test] +fn test_to_unsatisfiable_range_suffix() { + let range = super::test_decode::(&["bytes=-350"]).unwrap(); + let bounds = range.satisfiable_ranges(100).next(); + assert_eq!(bounds, None); +} From 6ebb42d8e1a1db0b637ea8b4074eeb087af935b8 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Fri, 24 Nov 2023 12:07:54 -0500 Subject: [PATCH 10/13] update license year --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index aa33b8e7..985a757d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014-2019 Sean McArthur +Copyright (c) 2014-2023 Sean McArthur Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From b8cf384cc40c75a659240ea7d07898e65db72d4e Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Fri, 24 Nov 2023 14:12:48 -0500 Subject: [PATCH 11/13] headers-core:v0.3.0 --- Cargo.toml | 2 +- headers-core/Cargo.toml | 2 +- headers-core/src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5037d069..1c14c164 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ members = [ [dependencies] http = "1.0.0" -headers-core = { version = "0.2", path = "./headers-core" } +headers-core = { version = "0.3", path = "./headers-core" } base64 = "0.21.3" bytes = "1" mime = "0.3.14" diff --git a/headers-core/Cargo.toml b/headers-core/Cargo.toml index 23f2556d..60ecec29 100644 --- a/headers-core/Cargo.toml +++ b/headers-core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "headers-core" -version = "0.2.0" # don't forget to update html_root_url +version = "0.3.0" # don't forget to update html_root_url description = "typed HTTP headers core trait" license = "MIT" readme = "README.md" diff --git a/headers-core/src/lib.rs b/headers-core/src/lib.rs index 92e3d15e..5692b65a 100644 --- a/headers-core/src/lib.rs +++ b/headers-core/src/lib.rs @@ -1,7 +1,7 @@ #![deny(missing_docs)] #![deny(missing_debug_implementations)] #![cfg_attr(test, deny(warnings))] -#![doc(html_root_url = "https://docs.rs/headers-core/0.2.0")] +#![doc(html_root_url = "https://docs.rs/headers-core/0.3.0")] //! # headers-core //! From ad331d0bd57700e4daadf5c370ff9e2295dd8b8a Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Fri, 24 Nov 2023 14:15:00 -0500 Subject: [PATCH 12/13] headers:v0.4.0 --- Cargo.toml | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1c14c164..05dc58e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "headers" -version = "0.3.9" # don't forget to update html_root_url +version = "0.4.0" # don't forget to update html_root_url description = "typed HTTP headers" license = "MIT" readme = "README.md" diff --git a/src/lib.rs b/src/lib.rs index 7d1ddaed..18c57fba 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,7 +2,7 @@ #![deny(missing_debug_implementations)] #![cfg_attr(test, deny(warnings))] #![cfg_attr(all(test, feature = "nightly"), feature(test))] -#![doc(html_root_url = "https://docs.rs/headers/0.3.9")] +#![doc(html_root_url = "https://docs.rs/headers/0.4.0")] //! # Typed HTTP Headers //! From b01d6ae1f41374228ad29176ceac90a830fa7912 Mon Sep 17 00:00:00 2001 From: Jose Quintana Date: Tue, 5 Dec 2023 01:59:12 +0100 Subject: [PATCH 13/13] v1.1.0 --- Cargo.toml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2d57eea8..95ae3e9c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "headers-accept-encoding" -version = "1.0.1" # don't forget to update html_root_url +version = "1.1.0" # don't forget to update html_root_url description = "Hypper typed HTTP headers with Accept-Encoding + zstd support" license = "MIT" readme = "README.md" @@ -9,14 +9,8 @@ repository = "https://github.com/static-web-server/headers-accept-encoding" authors = ["Sean McArthur ", "Jose Quintana "] keywords = ["http", "headers", "hyper", "hyperium"] categories = ["web-programming"] -rust-version = "1.56" -rust-version = "1.56" -[workspace] -members = [ - "./", - "headers-core", -] +rust-version = "1.56" [dependencies] http = "1.0.0"