mirror of
https://github.com/librespot-org/librespot.git
synced 2025-10-04 02:09:26 +02:00
Validate proxy urls better.
Use the url crate to handle proxies to make sure they conform to a proper format.
This commit is contained in:
parent
1a04e3b899
commit
3a14e9a6be
8 changed files with 35 additions and 24 deletions
|
@ -96,7 +96,7 @@ impl<T: AsyncRead + AsyncWrite> Future for ProxyTunnel<T> {
|
|||
}
|
||||
|
||||
fn proxy_connect<T: AsyncWrite>(connection: T, connect_url: &str) -> WriteAll<T, Vec<u8>> {
|
||||
let uri = Uri::from_str(&connect_url).unwrap();
|
||||
let uri = Uri::from_str(connect_url).unwrap();
|
||||
let buffer = format!(
|
||||
"CONNECT {0}:{1} HTTP/1.1\r\n\
|
||||
\r\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue