Skip to content

Commit cb77cec

Browse files
committed
Only strip path, scheme when protocol is not set
1 parent 1369ec1 commit cb77cec

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/client/client.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use crate::common::{
1616
exec::BoxSendFuture, lazy as hyper_lazy, sync_wrapper::SyncWrapper, task, Future, Lazy, Pin,
1717
Poll,
1818
};
19+
use crate::ext::Protocol;
1920
use crate::rt::Executor;
2021

2122
use super::conn;
@@ -277,6 +278,10 @@ where
277278
} else {
278279
origin_form(req.uri_mut());
279280
}
281+
} else if req.method() == Method::CONNECT {
282+
if req.extensions().get::<Protocol>().is_none() {
283+
authority_form(req.uri_mut());
284+
}
280285
}
281286

282287
let mut res = match pooled.send_request_retryable(req).await {

0 commit comments

Comments
 (0)