public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] fix #4779: client: add missing "Connection" header for HTTP2 upgrade
@ 2023-10-19  8:57 Max Carrara
  2023-10-19 14:50 ` [pbs-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Max Carrara @ 2023-10-19  8:57 UTC (permalink / raw)
  To: pbs-devel; +Cc: McTwist

This commit adds the missing "Connection: upgrade" HTTP header[1]
when requesting an upgrade to HTTP 2.

[1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Upgrade

Reported-By: McTwist <rajb89@hotmail.com>
Signed-off-by: Max Carrara <m.carrara@proxmox.com>
---
 pbs-client/src/http_client.rs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pbs-client/src/http_client.rs b/pbs-client/src/http_client.rs
index 90d0d04b..b803c19f 100644
--- a/pbs-client/src/http_client.rs
+++ b/pbs-client/src/http_client.rs
@@ -764,6 +764,8 @@ impl HttpClient {
             );
         }
 
+        req.headers_mut()
+            .insert("Connection", HeaderValue::from_str("upgrade").unwrap());
         req.headers_mut()
             .insert("UPGRADE", HeaderValue::from_str(&protocol_name).unwrap());
 
-- 
2.39.2





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

end of thread, other threads:[~2023-10-19 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-19  8:57 [pbs-devel] [PATCH proxmox-backup] fix #4779: client: add missing "Connection" header for HTTP2 upgrade Max Carrara
2023-10-19 14:50 ` [pbs-devel] applied: " Thomas Lamprecht

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