mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-12 00:22:05 +00:00
http: fix proxy authorization header to include type
and encode the username:password string as base64 [0]. This fixes the error 407 issue when using proxy authentication [1]. [0] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Proxy-Authorization [1] https://forum.proxmox.com/threads/checking-the-subscription-behind-a-proxy-fails.112063/ Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
This commit is contained in:
parent
760c49be6e
commit
a8a838754d
@ -184,8 +184,8 @@ impl hyper::service::Service<Uri> for HttpsConnector {
|
|||||||
if let Some(authorization) = authorization {
|
if let Some(authorization) = authorization {
|
||||||
let _ = write!(
|
let _ = write!(
|
||||||
connect_request,
|
connect_request,
|
||||||
"Proxy-Authorization: {}\r\n",
|
"Proxy-Authorization: Basic {}\r\n",
|
||||||
authorization
|
base64::encode(authorization)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
let _ = write!(connect_request, "Host: {0}:{1}\r\n\r\n", host, port);
|
let _ = write!(connect_request, "Host: {0}:{1}\r\n\r\n", host, port);
|
||||||
|
Loading…
Reference in New Issue
Block a user