Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(fetch): reimplement fetch with hyper instead of reqwest #24237

Merged
merged 49 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
9414b37
refactor: reimplement fetch with hyper instead of reqwest
seanmonstar Jul 2, 2024
b3a969d
add request_builder_hook back
seanmonstar Jul 2, 2024
7ebe019
add copyright to proxy.rs file
seanmonstar Jul 2, 2024
a652549
send user-agent with proxy tunnel request
seanmonstar Jul 2, 2024
a86ca03
fix https tunneling, add back socks
seanmonstar Jul 2, 2024
9e46f21
format imports
seanmonstar Jul 2, 2024
3108c3c
fix proxy parsing unit test
seanmonstar Jul 2, 2024
ae7bba9
format unit tests
seanmonstar Jul 2, 2024
ab54f12
clippy the fetch crate
seanmonstar Jul 2, 2024
6218613
format after clippy
seanmonstar Jul 2, 2024
c435533
clippy and fmt kv/cli
seanmonstar Jul 2, 2024
f1b03dd
add reqwest dev-dependency; fix tests
bartlomieju Jul 2, 2024
349bb41
Merge branch 'main' into fetch-with-hyper
bartlomieju Jul 2, 2024
6a274bc
use workspace reqwest
bartlomieju Jul 3, 2024
29e4aee
fix copyright
bartlomieju Jul 3, 2024
c959ea8
fix proxy parse from env test
seanmonstar Jul 3, 2024
571944c
fix non-proxy to not send absolute-form
seanmonstar Jul 3, 2024
04da78a
fetch tests: remove space between gzip, br
seanmonstar Jul 3, 2024
b6b12f4
tests: update error message assertions
seanmonstar Jul 3, 2024
e8d746e
tests: fix serve_test error message assertion
seanmonstar Jul 3, 2024
c6b4070
Merge remote-tracking branch 'upstream/main' into fetch-with-hyper
seanmonstar Jul 3, 2024
43f2cb9
tests: fix async error stack pattern assertion
seanmonstar Jul 3, 2024
693ae6d
macos: remove rustls-native-certs dependency
seanmonstar Jul 3, 2024
8f533b1
Merge remote-tracking branch 'upstream/main' into fetch-with-hyper
seanmonstar Jul 3, 2024
0ce1075
more test error message changes
seanmonstar Jul 3, 2024
557d2dd
fetch: port over NO_PROXY support
seanmonstar Jul 3, 2024
664ff10
some review comments
seanmonstar Jul 3, 2024
1142d8e
get error class from hyper errors
seanmonstar Jul 3, 2024
a471b13
remove body error source check
seanmonstar Jul 3, 2024
f3beefa
extract hyper body error source again
seanmonstar Jul 3, 2024
d6d3dc2
use a ResourceBodyError sentinel type
seanmonstar Jul 4, 2024
2148659
Merge remote-tracking branch 'upstream/main' into fetch-with-hyper
seanmonstar Jul 4, 2024
b6aaf04
remove ResourceBodyError wrapper, it didn't work
seanmonstar Jul 5, 2024
92ffdf7
Merge branch 'main' into fetch-with-hyper
bartlomieju Jul 5, 2024
8ccf6c7
lint
bartlomieju Jul 5, 2024
b66e01a
send proxy-authorization when proxy is http forward
seanmonstar Jul 6, 2024
2a75c2b
Merge remote-tracking branch 'upstream/main' into fetch-with-hyper
seanmonstar Jul 6, 2024
31994c0
fmt
seanmonstar Jul 6, 2024
d2a4f2b
Merge remote-tracking branch 'upstream/main' into fetch-with-hyper
seanmonstar Jul 8, 2024
2354a6e
Merge remote-tracking branch 'upstream/main' into fetch-with-hyper
seanmonstar Jul 8, 2024
434b431
Merge remote-tracking branch 'upstream/main' into fetch-with-hyper
seanmonstar Jul 8, 2024
673deb8
reset CI
bartlomieju Jul 8, 2024
e35038f
Merge branch 'main' into fetch-with-hyper
bartlomieju Jul 8, 2024
5eb1fdf
Merge branch 'main' into fetch-with-hyper
bartlomieju Jul 9, 2024
58efd4d
allow proxy tunnel response to have more headers
seanmonstar Jul 9, 2024
04ff732
Merge branch 'main' into fetch-with-hyper
bartlomieju Jul 9, 2024
ee6526c
Merge branch 'main' into fetch-with-hyper
bartlomieju Jul 9, 2024
4db5c39
gh cache bust
bartlomieju Jul 9, 2024
7f064c5
Merge branch 'main' into fetch-with-hyper
bartlomieju Jul 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
format imports
  • Loading branch information
seanmonstar committed Jul 2, 2024
commit 9e46f2126a61be6f73710b464acf3f8d480a929e
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ http-body-util = "0.1.2"
http_v02 = { package = "http", version = "0.2.9" }
httparse = "1.8.0"
hyper = { version = "=1.4.0", features = ["full"] }
hyper-util = { version = "=0.1.6", features = ["tokio", "client", "client-legacy", "server", "server-auto"] }
hyper-rustls = { version = "0.26.0" }
hyper-util = { version = "=0.1.6", features = ["tokio", "client", "client-legacy", "server", "server-auto"] }
hyper_v014 = { package = "hyper", version = "0.14.26", features = ["runtime", "http1"] }
indexmap = { version = "2", features = ["serde"] }
jsonc-parser = { version = "=0.23.0", features = ["serde"] }
Expand Down Expand Up @@ -179,8 +179,8 @@ tokio-rustls = "0.25.0"
tokio-socks = "0.5.1"
tokio-util = "0.7.4"
tower = { version = "0.4.13", default-features = false, features = ["util"] }
tower-lsp = { version = "=0.20.0", features = ["proposed"] }
tower-http = { version = "0.5.2", features = ["decompression-br", "decompression-gzip"] }
tower-lsp = { version = "=0.20.0", features = ["proposed"] }
tower-service = "0.3.2"
twox-hash = "=1.6.3"
# Upgrading past 2.4.1 may cause WPT failures
Expand Down
3 changes: 2 additions & 1 deletion ext/fetch/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ async fn tunnel<T>(
where
T: hyper::rt::Read + hyper::rt::Write + Unpin,
{
use tokio::io::{AsyncReadExt, AsyncWriteExt};
use tokio::io::AsyncReadExt;
use tokio::io::AsyncWriteExt;

let host = dst.host().expect("proxy dst has host");
let port = match dst.port() {
Expand Down
Loading