Skip to content

Commit 36b6456

Browse files
seanmonstarloispostulaJakub Wieczorek
committed
wip: hyper v1 upgrade
Co-authored-by: Sean McArthur <[email protected]> Co-authored-by: =?UTF-8?q?Lo=C3=AFs=20Postula?= <[email protected]> Co-authored-by: Jakub Wieczorek <[email protected]>
1 parent e639bdc commit 36b6456

30 files changed

+695
-498
lines changed

.github/workflows/ci.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -101,23 +101,23 @@ jobs:
101101
- name: windows / stable-x86_64-msvc
102102
os: windows-latest
103103
target: x86_64-pc-windows-msvc
104-
features: "--features blocking,gzip,brotli,deflate,json,multipart"
104+
features: "--features blocking,gzip,brotli,deflate,json,multipart,stream"
105105
- name: windows / stable-i686-msvc
106106
os: windows-latest
107107
target: i686-pc-windows-msvc
108-
features: "--features blocking,gzip,brotli,deflate,json,multipart"
108+
features: "--features blocking,gzip,brotli,deflate,json,multipart,stream"
109109
- name: windows / stable-x86_64-gnu
110110
os: windows-latest
111111
rust: stable-x86_64-pc-windows-gnu
112112
target: x86_64-pc-windows-gnu
113-
features: "--features blocking,gzip,brotli,deflate,json,multipart"
113+
features: "--features blocking,gzip,brotli,deflate,json,multipart,stream"
114114
package_name: mingw-w64-x86_64-gcc
115115
mingw64_path: "C:\\msys64\\mingw64\\bin"
116116
- name: windows / stable-i686-gnu
117117
os: windows-latest
118118
rust: stable-i686-pc-windows-gnu
119119
target: i686-pc-windows-gnu
120-
features: "--features blocking,gzip,brotli,deflate,json,multipart"
120+
features: "--features blocking,gzip,brotli,deflate,json,multipart,stream"
121121
package_name: mingw-w64-i686-gcc
122122
mingw64_path: "C:\\msys64\\mingw32\\bin"
123123

@@ -136,11 +136,11 @@ jobs:
136136
- name: "feat.: blocking"
137137
features: "--features blocking"
138138
- name: "feat.: gzip"
139-
features: "--features gzip"
139+
features: "--features gzip,stream"
140140
- name: "feat.: brotli"
141-
features: "--features brotli"
141+
features: "--features brotli,stream"
142142
- name: "feat.: deflate"
143-
features: "--features deflate"
143+
features: "--features deflate,stream"
144144
- name: "feat.: json"
145145
features: "--features json"
146146
- name: "feat.: multipart"
@@ -209,6 +209,7 @@ jobs:
209209

210210
docs:
211211
name: Docs
212+
needs: [test]
212213
runs-on: ubuntu-latest
213214

214215
steps:

Cargo.toml

+20-16
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ default-tls = ["hyper-tls", "native-tls-crate", "__tls", "tokio-native-tls"]
3535

3636
# Enables native-tls specific functionality not available by default.
3737
native-tls = ["default-tls"]
38-
native-tls-alpn = ["native-tls", "native-tls-crate/alpn"]
38+
native-tls-alpn = ["native-tls", "native-tls-crate/alpn", "hyper-tls/alpn"]
3939
native-tls-vendored = ["native-tls", "native-tls-crate/vendored"]
4040

4141
rustls-tls = ["rustls-tls-webpki-roots"]
4242
rustls-tls-manual-roots = ["__rustls"]
4343
rustls-tls-webpki-roots = ["webpki-roots", "__rustls"]
4444
rustls-tls-native-roots = ["rustls-native-certs", "__rustls"]
4545

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

4848
cookies = ["cookie_crate", "cookie_store"]
4949

@@ -74,14 +74,14 @@ __tls = ["dep:rustls-pemfile"]
7474

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

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

8282
[dependencies]
8383
base64 = "0.21"
84-
http = "0.2"
84+
http = "1"
8585
url = "2.2"
8686
bytes = "1.0"
8787
serde = "1.0"
@@ -100,9 +100,11 @@ mime_guess = { version = "2.0", default-features = false, optional = true }
100100

101101
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
102102
encoding_rs = "0.8"
103-
http-body = "0.4.0"
104-
hyper = { version = "0.14.21", default-features = false, features = ["tcp", "http1", "http2", "client", "runtime"] }
105-
h2 = "0.3.14"
103+
http-body = "1"
104+
http-body-util = "0.1"
105+
hyper = { version = "1", features = ["http1", "http2", "client"] }
106+
hyper-util = { version = "0.1.3", features = ["http1", "http2", "client", "client-legacy", "tokio"] }
107+
h2 = "0.4"
106108
once_cell = "1"
107109
log = "0.4"
108110
mime = "0.3.16"
@@ -115,15 +117,16 @@ ipnet = "2.3"
115117
rustls-pemfile = { version = "1.0", optional = true }
116118

117119
## default-tls
118-
hyper-tls = { version = "0.5", optional = true }
120+
hyper-tls = { version = "0.6", optional = true }
119121
native-tls-crate = { version = "0.2.10", optional = true, package = "native-tls" }
120122
tokio-native-tls = { version = "0.3.0", optional = true }
121123

122124
# rustls-tls
123-
hyper-rustls = { version = "0.24.0", default-features = false, optional = true }
124-
rustls = { version = "0.21.6", features = ["dangerous_configuration"], optional = true }
125-
tokio-rustls = { version = "0.24", optional = true }
126-
webpki-roots = { version = "0.25", optional = true }
125+
hyper-rustls = { version = "0.26.0", default-features = false, optional = true }
126+
rustls = { version = "0.22.2", optional = true }
127+
rustls-pki-types = { version = "1.1.0", features = ["alloc"] ,optional = true }
128+
tokio-rustls = { version = "0.25", optional = true }
129+
webpki-roots = { version = "0.26.0", optional = true }
127130
rustls-native-certs = { version = "0.6", optional = true }
128131

129132
## cookies
@@ -149,7 +152,8 @@ futures-channel = { version = "0.3", optional = true }
149152

150153
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
151154
env_logger = "0.10"
152-
hyper = { version = "0.14", default-features = false, features = ["tcp", "stream", "http1", "http2", "client", "server", "runtime"] }
155+
hyper = { version = "1.1.0", default-features = false, features = ["http1", "http2", "client", "server"] }
156+
hyper-util = { version = "0.1", features = ["http1", "http2", "client", "client-legacy", "server-auto", "tokio"] }
153157
serde = { version = "1.0", features = ["derive"] }
154158
libflate = "1.0"
155159
brotli_crate = { package = "brotli", version = "3.3.0" }
@@ -237,17 +241,17 @@ required-features = ["cookies"]
237241
[[test]]
238242
name = "gzip"
239243
path = "tests/gzip.rs"
240-
required-features = ["gzip"]
244+
required-features = ["gzip", "stream"]
241245

242246
[[test]]
243247
name = "brotli"
244248
path = "tests/brotli.rs"
245-
required-features = ["brotli"]
249+
required-features = ["brotli", "stream"]
246250

247251
[[test]]
248252
name = "deflate"
249253
path = "tests/deflate.rs"
250-
required-features = ["deflate"]
254+
required-features = ["deflate", "stream"]
251255

252256
[[test]]
253257
name = "multipart"

0 commit comments

Comments
 (0)