Skip to content

Commit

Permalink
revert: hyper v1 upgrade (for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Mar 12, 2024
1 parent e319263 commit c7940c6
Show file tree
Hide file tree
Showing 31 changed files with 548 additions and 871 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ jobs:
- "feat.: default-tls disabled"
- "feat.: rustls-tls"
- "feat.: rustls-tls-manual-roots"
- "feat.: rustls-tls-native-roots"
- "feat.: native-tls"
- "feat.: default-tls and rustls-tls"
- "feat.: cookies"
Expand Down Expand Up @@ -102,23 +101,23 @@ jobs:
- name: windows / stable-x86_64-msvc
os: windows-latest
target: x86_64-pc-windows-msvc
features: "--features blocking,gzip,brotli,deflate,json,multipart,stream"
features: "--features blocking,gzip,brotli,deflate,json,multipart"
- name: windows / stable-i686-msvc
os: windows-latest
target: i686-pc-windows-msvc
features: "--features blocking,gzip,brotli,deflate,json,multipart,stream"
features: "--features blocking,gzip,brotli,deflate,json,multipart"
- name: windows / stable-x86_64-gnu
os: windows-latest
rust: stable-x86_64-pc-windows-gnu
target: x86_64-pc-windows-gnu
features: "--features blocking,gzip,brotli,deflate,json,multipart,stream"
features: "--features blocking,gzip,brotli,deflate,json,multipart"
package_name: mingw-w64-x86_64-gcc
mingw64_path: "C:\\msys64\\mingw64\\bin"
- name: windows / stable-i686-gnu
os: windows-latest
rust: stable-i686-pc-windows-gnu
target: i686-pc-windows-gnu
features: "--features blocking,gzip,brotli,deflate,json,multipart,stream"
features: "--features blocking,gzip,brotli,deflate,json,multipart"
package_name: mingw-w64-i686-gcc
mingw64_path: "C:\\msys64\\mingw32\\bin"

Expand All @@ -128,8 +127,6 @@ jobs:
features: "--no-default-features --features rustls-tls"
- name: "feat.: rustls-tls-manual-roots"
features: "--no-default-features --features rustls-tls-manual-roots"
- name: "feat.: rustls-tls-native-roots"
features: "--no-default-features --features rustls-tls-native-roots"
- name: "feat.: native-tls"
features: "--features native-tls"
- name: "feat.: default-tls and rustls-tls"
Expand All @@ -139,11 +136,11 @@ jobs:
- name: "feat.: blocking"
features: "--features blocking"
- name: "feat.: gzip"
features: "--features gzip,stream"
features: "--features gzip"
- name: "feat.: brotli"
features: "--features brotli,stream"
features: "--features brotli"
- name: "feat.: deflate"
features: "--features deflate,stream"
features: "--features deflate"
- name: "feat.: json"
features: "--features json"
- name: "feat.: multipart"
Expand Down Expand Up @@ -207,12 +204,11 @@ jobs:
with:
toolchain: 'stable'

#- name: Check
# run: RUSTFLAGS="--cfg reqwest_unstable" cargo check --features http3
- name: Check
run: RUSTFLAGS="--cfg reqwest_unstable" cargo check --features http3

docs:
name: Docs
needs: [test]
runs-on: ubuntu-latest

steps:
Expand Down
51 changes: 22 additions & 29 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,23 @@ features = [
]

[features]
default = ["default-tls", "http2"]
default = ["default-tls"]

# Note: this doesn't enable the 'native-tls' feature, which adds specific
# functionality for it.
default-tls = ["hyper-tls", "native-tls-crate", "__tls", "tokio-native-tls"]

http2 = ["h2", "hyper/http2", "hyper-util/http2"]

# Enables native-tls specific functionality not available by default.
native-tls = ["default-tls"]
native-tls-alpn = ["native-tls", "native-tls-crate/alpn", "hyper-tls/alpn"]
native-tls-alpn = ["native-tls", "native-tls-crate/alpn"]
native-tls-vendored = ["native-tls", "native-tls-crate/vendored"]

rustls-tls = ["rustls-tls-webpki-roots"]
rustls-tls-manual-roots = ["__rustls"]
rustls-tls-webpki-roots = ["webpki-roots", "__rustls"]
rustls-tls-native-roots = ["rustls-native-certs", "__rustls"]

blocking = ["futures-channel/sink", "futures-util/io", "futures-util/sink", "tokio/rt-multi-thread", "tokio/sync"]
blocking = ["futures-util/io", "tokio/sync"]

cookies = ["cookie_crate", "cookie_store"]

Expand All @@ -66,25 +64,24 @@ stream = ["tokio/fs", "tokio-util", "wasm-streams"]
socks = ["tokio-socks"]

# Experimental HTTP/3 client.
# Disabled while waiting for quinn to upgrade.
#http3 = ["rustls-tls-manual-roots", "h3", "h3-quinn", "quinn", "futures-channel"]
http3 = ["rustls-tls-manual-roots", "h3", "h3-quinn", "quinn", "futures-channel"]

# Internal (PRIVATE!) features used to aid testing.
# Don't rely on these whatsoever. They may disappear at anytime.

# Enables common types used for TLS. Useless on its own.
__tls = ["dep:rustls-pemfile", "tokio/io-util"]
__tls = ["dep:rustls-pemfile"]

# Enables common rustls code.
# Equivalent to rustls-tls-manual-roots but shorter :)
__rustls = ["hyper-rustls", "tokio-rustls", "rustls", "__tls", "dep:rustls-pemfile", "rustls-pki-types"]
__rustls = ["hyper-rustls", "tokio-rustls", "rustls", "__tls"]

# When enabled, disable using the cached SYS_PROXIES.
__internal_proxy_sys_no_cache = []

[dependencies]
base64 = "0.21"
http = "1"
http = "0.2"
url = "2.2"
bytes = "1.0"
serde = "1.0"
Expand All @@ -103,11 +100,9 @@ mime_guess = { version = "2.0", default-features = false, optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
encoding_rs = "0.8"
http-body = "1"
http-body-util = "0.1"
hyper = { version = "1", features = ["http1", "client"] }
hyper-util = { version = "0.1.3", features = ["http1", "client", "client-legacy", "tokio"] }
h2 = { version = "0.4", optional = true }
http-body = "0.4.0"
hyper = { version = "0.14.21", default-features = false, features = ["tcp", "http1", "http2", "client", "runtime"] }
h2 = "0.3.14"
once_cell = "1"
log = "0.4"
mime = "0.3.16"
Expand All @@ -120,17 +115,16 @@ ipnet = "2.3"
rustls-pemfile = { version = "1.0", optional = true }

## default-tls
hyper-tls = { version = "0.6", optional = true }
hyper-tls = { version = "0.5", optional = true }
native-tls-crate = { version = "0.2.10", optional = true, package = "native-tls" }
tokio-native-tls = { version = "0.3.0", optional = true }

# rustls-tls
hyper-rustls = { version = "0.26.0", default-features = false, optional = true }
rustls = { version = "0.22.2", optional = true }
rustls-pki-types = { version = "1.1.0", features = ["alloc"] ,optional = true }
tokio-rustls = { version = "0.25", optional = true }
webpki-roots = { version = "0.26.0", optional = true }
rustls-native-certs = { version = "0.7", optional = true }
hyper-rustls = { version = "0.24.0", default-features = false, optional = true }
rustls = { version = "0.21.6", features = ["dangerous_configuration"], optional = true }
tokio-rustls = { version = "0.24", optional = true }
webpki-roots = { version = "0.25", optional = true }
rustls-native-certs = { version = "0.6", optional = true }

## cookies
cookie_crate = { version = "0.17.0", package = "cookie", optional = true }
Expand All @@ -147,16 +141,15 @@ tokio-socks = { version = "0.5.1", optional = true }
trust-dns-resolver = { version = "0.23", optional = true, features = ["tokio-runtime"] }

# HTTP/3 experimental support
h3 = { version = "0.0.4", optional = true }
h3-quinn = { version = "0.0.5", optional = true }
h3 = { version = "0.0.3", optional = true }
h3-quinn = { version = "0.0.4", optional = true }
quinn = { version = "0.10", default-features = false, features = ["tls-rustls", "ring", "runtime-tokio"], optional = true }
futures-channel = { version = "0.3", optional = true }


[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
env_logger = "0.10"
hyper = { version = "1.1.0", default-features = false, features = ["http1", "http2", "client", "server"] }
hyper-util = { version = "0.1", features = ["http1", "http2", "client", "client-legacy", "server-auto", "tokio"] }
hyper = { version = "0.14", default-features = false, features = ["tcp", "stream", "http1", "http2", "client", "server", "runtime"] }
serde = { version = "1.0", features = ["derive"] }
libflate = "1.0"
brotli_crate = { package = "brotli", version = "3.3.0" }
Expand Down Expand Up @@ -244,17 +237,17 @@ required-features = ["cookies"]
[[test]]
name = "gzip"
path = "tests/gzip.rs"
required-features = ["gzip", "stream"]
required-features = ["gzip"]

[[test]]
name = "brotli"
path = "tests/brotli.rs"
required-features = ["brotli", "stream"]
required-features = ["brotli"]

[[test]]
name = "deflate"
path = "tests/deflate.rs"
required-features = ["deflate", "stream"]
required-features = ["deflate"]

[[test]]
name = "multipart"
Expand Down
Loading

0 comments on commit c7940c6

Please sign in to comment.