public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-http] http: fix proxy authorization header to include type
@ 2022-07-20 14:20 Mira Limbeck
  2022-07-21 10:56 ` [pbs-devel] applied: " Wolfgang Bumiller
  2022-07-21 11:32 ` [pbs-devel] " Thomas Lamprecht
  0 siblings, 2 replies; 5+ messages in thread
From: Mira Limbeck @ 2022-07-20 14:20 UTC (permalink / raw)
  To: pbs-devel

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>
---
 proxmox-http/src/client/connector.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxmox-http/src/client/connector.rs b/proxmox-http/src/client/connector.rs
index d6ba9dd..f3e7535 100644
--- a/proxmox-http/src/client/connector.rs
+++ b/proxmox-http/src/client/connector.rs
@@ -184,8 +184,8 @@ impl hyper::service::Service<Uri> for HttpsConnector {
                     if let Some(authorization) = authorization {
                         let _ = write!(
                             connect_request,
-                            "Proxy-Authorization: {}\r\n",
-                            authorization
+                            "Proxy-Authorization: Basic {}\r\n",
+                            base64::encode(authorization)
                         );
                     }
                     let _ = write!(connect_request, "Host: {0}:{1}\r\n\r\n", host, port);
-- 
2.30.2





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-22  9:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-20 14:20 [pbs-devel] [PATCH proxmox-http] http: fix proxy authorization header to include type Mira Limbeck
2022-07-21 10:56 ` [pbs-devel] applied: " Wolfgang Bumiller
2022-07-21 11:32 ` [pbs-devel] " Thomas Lamprecht
2022-07-21 11:46   ` Wolfgang Bumiller
2022-07-22  9:50     ` Mira Limbeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal