Skip to content

Commit

Permalink
Bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Nov 20, 2023
1 parent cbb18f5 commit 1260c46
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
19 changes: 10 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "http-cache-semantics"
version = "1.0.2"
version = "2.0.0"
description = "RFC 7234. Parses HTTP headers to correctly compute cacheability of responses, even in complex cases"
homepage = "https://lib.rs/http-cache-semantics"
repository = "https://github.com/kornelski/rusty-http-cache-semantics"
Expand All @@ -12,20 +12,21 @@ categories = ["caching", "web-programming::http-client"]
keywords = ["http", "cache", "headers", "cache-control", "proxy"]
include = ["Cargo.toml", "README.md", "src/*.rs", "LICENSE"]
readme = "README.md"
rust-version = "1.64"

[dependencies]
http = "0.2.6"
http-serde = { version = "1.1.0", optional = true }
serde = { version = "1.0.136", optional = true, features = ["derive"] }
reqwest = { version = "0.11.10", default-features = false, optional = true }
time = { version = "0.3.9", features = ["parsing", "formatting"] }
http = "1.0.0"
http-serde = { version = "2.0.0", optional = true }
serde = { version = "1.0.192", optional = true, features = ["derive"] }
# reqwest = { version = "0.11.22", default-features = false, optional = true } # not upgraded yet
time = { version = "0.3.30", features = ["parsing", "formatting"] }

[dev-dependencies]
serde_json = "1.0.79"
serde_json = "1.0.108"

[features]
default = ["with_serde"]
with_serde = ["dep:serde", "dep:http-serde"]
default = ["serde"]
serde = ["dep:serde", "dep:http-serde"]

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
Expand Down
6 changes: 3 additions & 3 deletions tests/okhttp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ fn test_max_age_preferred_over_higher_max_age() {
let request = request_parts(Request::get("/"));
let response = response_parts(
Response::builder()
.header(header::AGE, 3*60)
.header(header::AGE, 3 * 60)
.header(header::CACHE_CONTROL, "s-maxage=60, max-age=180"),
);
let policy = CachePolicy::new_options(&request, &response, now, options);
Expand Down Expand Up @@ -365,7 +365,7 @@ fn test_request_max_stale() {
let response = response_parts(
Response::builder()
.header(header::CACHE_CONTROL, "max-age=120")
.header(header::AGE, 4*60),
.header(header::AGE, 4 * 60),
);

let policy =
Expand Down Expand Up @@ -407,7 +407,7 @@ fn test_request_max_stale_not_honored_with_must_revalidate() {
Response::builder()
.header(header::CACHE_CONTROL, "max-age=120, must-revalidate")
.header(header::DATE, format_date(15, 60))
.header(header::AGE, 4*60),
.header(header::AGE, 4 * 60),
);

let policy =
Expand Down

0 comments on commit 1260c46

Please sign in to comment.