Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion pingora-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ windows-sys = { version = "0.59.0", features = ["Win32_Networking_WinSock"] }
h2 = { workspace = true, features = ["unstable"] }
tokio-stream = { version = "0.1", features = ["full"] }
env_logger = "0.11"
reqwest = { version = "0.11", features = [
reqwest = { version = "0.12", features = [
"rustls-tls",
], default-features = false }
hyper = "0.14"
Expand Down
4 changes: 2 additions & 2 deletions pingora-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ regex = "1"
rand = "0.8"

[dev-dependencies]
reqwest = { version = "0.11", features = [
reqwest = { version = "0.12", features = [
"gzip",
"rustls-tls",
], default-features = false }
httparse = { workspace = true }
tokio-test = "0.4"
env_logger = "0.11"
hyper = "0.14"
hyper = { version = "0.14", features = ["http2"] }
tokio-tungstenite = "0.20.1"
pingora-limits = { version = "0.8.0", path = "../pingora-limits" }
pingora-load-balancing = { version = "0.8.0", path = "../pingora-load-balancing", default-features=false }
Expand Down
12 changes: 6 additions & 6 deletions pingora-proxy/tests/test_basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ async fn test_h2c_to_h2c() {
req.headers_mut()
.insert("x-h2", HeaderValue::from_bytes(b"true").unwrap());
let res = client.request(req).await.unwrap();
assert_eq!(res.status(), reqwest::StatusCode::OK);
assert_eq!(res.version(), reqwest::Version::HTTP_2);
assert_eq!(res.status(), hyper::StatusCode::OK);
assert_eq!(res.version(), hyper::Version::HTTP_2);

let body = res.into_body().data().await.unwrap().unwrap();
assert_eq!(body.as_ref(), b"Hello World!\n");
Expand All @@ -194,8 +194,8 @@ async fn test_h1_on_h2c_port() {
req.headers_mut()
.insert("x-h2", HeaderValue::from_bytes(b"true").unwrap());
let res = client.request(req).await.unwrap();
assert_eq!(res.status(), reqwest::StatusCode::OK);
assert_eq!(res.version(), reqwest::Version::HTTP_11);
assert_eq!(res.status(), hyper::StatusCode::OK);
assert_eq!(res.version(), hyper::Version::HTTP_11);

let body = res.into_body().data().await.unwrap().unwrap();
assert_eq!(body.as_ref(), b"Hello World!\n");
Expand Down Expand Up @@ -307,11 +307,11 @@ async fn test_simple_proxy_uds() {

let res = client.get(url).await.unwrap();

assert_eq!(res.status(), reqwest::StatusCode::OK);
assert_eq!(res.status(), hyper::StatusCode::OK);
let (resp, body) = res.into_parts();

let headers = &resp.headers;
assert_eq!(headers[header::CONTENT_LENGTH], "13");
assert_eq!(headers[hyper::header::CONTENT_LENGTH], "13");
assert_eq!(headers["x-server-addr"], "/tmp/pingora_proxy.sock");
assert_eq!(headers["x-client-addr"], "unset"); // unnamed UDS

Expand Down
9 changes: 5 additions & 4 deletions pingora-proxy/tests/test_upstream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ use utils::server_utils::init;
use utils::websocket::{WS_ECHO, WS_ECHO_RAW};

use futures::{SinkExt, StreamExt};
use hyper::header::HeaderValue;
use pingora_http::ResponseHeader;
use reqwest::header::{HeaderName, HeaderValue};
use reqwest::header::{HeaderName, HeaderValue as ReqwestHeaderValue};
use reqwest::{StatusCode, Version};
use std::time::{Duration, Instant};
use tokio::io::{AsyncReadExt, AsyncWriteExt};
Expand Down Expand Up @@ -374,7 +375,7 @@ async fn test_download_timeout() {
.body(hyper::Body::empty())
.unwrap();
let mut res = client.request(req).await.unwrap();
assert_eq!(res.status(), StatusCode::OK);
assert_eq!(res.status(), hyper::StatusCode::OK);

let mut err = false;
sleep(Duration::from_secs(2)).await;
Expand All @@ -401,7 +402,7 @@ async fn test_download_timeout_min_rate() {
.body(hyper::Body::empty())
.unwrap();
let mut res = client.request(req).await.unwrap();
assert_eq!(res.status(), StatusCode::OK);
assert_eq!(res.status(), hyper::StatusCode::OK);

let mut err = false;
sleep(Duration::from_secs(2)).await;
Expand Down Expand Up @@ -2924,7 +2925,7 @@ mod test_cache {
.map(|(name, value)| {
(
HeaderName::from_str(name).unwrap(),
HeaderValue::from_str(value).unwrap(),
ReqwestHeaderValue::from_str(value).unwrap(),
)
})
.collect();
Expand Down
2 changes: 1 addition & 1 deletion pingora/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ document-features = { version = "0.2.10", optional = true }
clap = { version = "4.5", features = ["derive"] }
tokio = { workspace = true, features = ["rt-multi-thread", "signal"] }
env_logger = "0.11"
reqwest = { version = "0.11", features = ["rustls"], default-features = false }
reqwest = { version = "0.12", features = ["rustls-tls"], default-features = false }
hyper = "0.14"
async-trait = { workspace = true }
http = { workspace = true }
Expand Down
Loading