Skip to content

Commit 7b33623

Browse files
Reland "refactor(fetch): reimplement fetch with hyper instead of reqwest" (#24593)
Originally landed in f6fd661. Reverted in #24574. This reland contains a fix that sends "Accept: */*" header for calls made from "FileFetcher". Absence of this header made downloading source code from JSR broken. This is tested by ensuring this header is present in the test server that servers JSR packages. --------- Co-authored-by: Sean McArthur <[email protected]>
1 parent f4b9d85 commit 7b33623

File tree

34 files changed

+1550
-347
lines changed

34 files changed

+1550
-347
lines changed

Cargo.lock

Lines changed: 41 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,16 @@ futures = "0.3.21"
115115
glob = "0.3.1"
116116
h2 = "0.4.4"
117117
http = "1.0"
118-
http-body-util = "0.1"
118+
http-body = "1.0"
119+
http-body-util = "0.1.2"
119120
http_v02 = { package = "http", version = "0.2.9" }
120121
httparse = "1.8.0"
121-
hyper = { version = "=1.4.1", features = ["full"] }
122-
hyper-util = { version = "=0.1.6", features = ["tokio", "server", "server-auto"] }
122+
hyper = { version = "1.4.1", features = ["full"] }
123+
hyper-rustls = { version = "0.27.2", default-features = false, features = ["http1", "http2", "tls12", "ring"] }
124+
hyper-util = { version = "=0.1.6", features = ["tokio", "client", "client-legacy", "server", "server-auto"] }
123125
hyper_v014 = { package = "hyper", version = "0.14.26", features = ["runtime", "http1"] }
124126
indexmap = { version = "2", features = ["serde"] }
127+
ipnet = "2.3"
125128
jsonc-parser = { version = "=0.23.0", features = ["serde"] }
126129
lazy-regex = "3"
127130
libc = "0.2.126"
@@ -173,8 +176,13 @@ termcolor = "1.1.3"
173176
thiserror = "1.0.61"
174177
tokio = { version = "1.36.0", features = ["full"] }
175178
tokio-metrics = { version = "0.3.0", features = ["rt"] }
179+
tokio-rustls = { version = "0.26.0", default-features = false, features = ["ring", "tls12"] }
180+
tokio-socks = "0.5.1"
176181
tokio-util = "0.7.4"
182+
tower = { version = "0.4.13", default-features = false, features = ["util"] }
183+
tower-http = { version = "0.5.2", features = ["decompression-br", "decompression-gzip"] }
177184
tower-lsp = { version = "=0.20.0", features = ["proposed"] }
185+
tower-service = "0.3.2"
178186
twox-hash = "=1.6.3"
179187
# Upgrading past 2.4.1 may cause WPT failures
180188
url = { version = "< 2.5.0", features = ["serde", "expose_internals"] }

cli/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ faster-hex.workspace = true
107107
flate2.workspace = true
108108
fs3.workspace = true
109109
glob = "0.3.1"
110+
http.workspace = true
111+
http-body.workspace = true
112+
http-body-util.workspace = true
113+
hyper-util.workspace = true
110114
import_map = { version = "=0.20.0", features = ["ext"] }
111115
indexmap.workspace = true
112116
jsonc-parser.workspace = true
@@ -128,7 +132,6 @@ phf.workspace = true
128132
quick-junit = "^0.3.5"
129133
rand = { workspace = true, features = ["small_rng"] }
130134
regex.workspace = true
131-
reqwest.workspace = true
132135
ring.workspace = true
133136
rustyline.workspace = true
134137
rustyline-derive = "=0.7.0"

0 commit comments

Comments
 (0)