Skip to content

Commit

Permalink
Only strip path, scheme when protocol is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
bdbai committed Jul 1, 2023
1 parent e5c99c3 commit a5660e4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use crate::common::{
exec::BoxSendFuture, lazy as hyper_lazy, sync_wrapper::SyncWrapper, task, Future, Lazy, Pin,
Poll,
};
use crate::ext::Protocol;
use crate::rt::Executor;

use super::conn;
Expand Down Expand Up @@ -277,6 +278,10 @@ where
} else {
origin_form(req.uri_mut());
}
} else if req.method() == Method::CONNECT {
if req.extensions().get::<Protocol>().is_none() {
authority_form(req.uri_mut());
}
}

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

0 comments on commit a5660e4

Please sign in to comment.