[libsoup/libsoup-3-0] connection: do not advertise h2 protocol for proxy connections



commit e17f6dd239503ecc61c28e34cdea915f9eda09bf
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Wed Jun 29 11:25:58 2022 +0200

    connection: do not advertise h2 protocol for proxy connections
    
    We don't support http/2 proxies yet.

 libsoup/soup-connection.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/libsoup/soup-connection.c b/libsoup/soup-connection.c
index a6e784b7..95bc737d 100644
--- a/libsoup/soup-connection.c
+++ b/libsoup/soup-connection.c
@@ -581,7 +581,8 @@ new_tls_connection (SoupConnection    *conn,
                 g_ptr_array_add (advertised_protocols, "h2");
                 break;
         default:
-                g_ptr_array_add (advertised_protocols, "h2");
+                if (!priv->remote_address || !G_IS_PROXY_ADDRESS (priv->remote_address))
+                        g_ptr_array_add (advertised_protocols, "h2");
                 g_ptr_array_add (advertised_protocols, "http/1.1");
                 g_ptr_array_add (advertised_protocols, "http/1.0");
                 break;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]