Skip to content

Commit a9b14ec

Browse files
committed
fix: parse proxy URI with prepending URL scheme
parse the URI of the proxy generated from Proxy::new(intercept, proxy_uri) rather than proxy_uri directly, since proxy_uri may be missing a URL scheme and in that case can't be parsed as a URL Signed-off-by: Gavin Inglis <[email protected]>
1 parent f837568 commit a9b14ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sources/aws-smithy-experimental/src/hyper_1_0.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ mod build_connector {
256256
}
257257
let mut proxy = Proxy::new(intercept, proxy_uri);
258258
// Parse https_proxy as URL to extract out auth information if any
259-
let proxy_url = Url::parse(https_proxy).expect("Unable to parse HTTPS proxy as URL");
259+
let proxy_url =
260+
Url::parse(&proxy.uri().to_string()).expect("Unable to parse HTTPS proxy as URL");
260261

261262
if !proxy_url.username().is_empty() || proxy_url.password().is_some() {
262263
proxy.set_authorization(Authorization::basic(

0 commit comments

Comments
 (0)