Title: [255344] releases/WebKitGTK/webkit-2.26/Source/WebKit
Revision
255344
Author
carlo...@webkit.org
Date
2020-01-29 01:55:29 -0800 (Wed, 29 Jan 2020)

Log Message

[GTK][WPE] QR code not loaded in web.whatsapp.com
https://bugs.webkit.org/show_bug.cgi?id=203404

Reviewed by Michael Catanzaro.

This is a regression of the switch to use libsoup API for the WebSockets implementation. The QR code is loaded
using a WebSocket connection, but the server is always replying with a 400 Bad Request to the Upgrade requests
coming from an existing HTTP connection. We need to ensure a new dedicated connection is used for WebSockets.

* NetworkProcess/soup/WebSocketTaskSoup.cpp:
(WebKit::WebSocketTask::WebSocketTask): Set the SOUP_MESSAGE_NEW_CONNECTION flag to the SoupMessage before
starting the connection.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.26/Source/WebKit/ChangeLog (255343 => 255344)


--- releases/WebKitGTK/webkit-2.26/Source/WebKit/ChangeLog	2020-01-29 09:52:17 UTC (rev 255343)
+++ releases/WebKitGTK/webkit-2.26/Source/WebKit/ChangeLog	2020-01-29 09:55:29 UTC (rev 255344)
@@ -1,3 +1,18 @@
+2020-01-28  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        [GTK][WPE] QR code not loaded in web.whatsapp.com
+        https://bugs.webkit.org/show_bug.cgi?id=203404
+
+        Reviewed by Michael Catanzaro.
+
+        This is a regression of the switch to use libsoup API for the WebSockets implementation. The QR code is loaded
+        using a WebSocket connection, but the server is always replying with a 400 Bad Request to the Upgrade requests
+        coming from an existing HTTP connection. We need to ensure a new dedicated connection is used for WebSockets.
+
+        * NetworkProcess/soup/WebSocketTaskSoup.cpp:
+        (WebKit::WebSocketTask::WebSocketTask): Set the SOUP_MESSAGE_NEW_CONNECTION flag to the SoupMessage before
+        starting the connection.
+
 2020-01-23  Adrian Perez de Castro  <ape...@igalia.com>
 
         Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.26.3 release

Modified: releases/WebKitGTK/webkit-2.26/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp (255343 => 255344)


--- releases/WebKitGTK/webkit-2.26/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp	2020-01-29 09:52:17 UTC (rev 255343)
+++ releases/WebKitGTK/webkit-2.26/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp	2020-01-29 09:55:29 UTC (rev 255344)
@@ -47,6 +47,12 @@
         for (auto& subprotocol : protocolList)
             protocols.get()[i++] = g_strdup(WebCore::stripLeadingAndTrailingHTTPSpaces(subprotocol).utf8().data());
     }
+
+    // Ensure a new connection is used for WebSockets.
+    // FIXME: this is done by libsoup since 2.69.1 and 2.68.4, so it can be removed when bumping the libsoup requirement.
+    // See https://bugs.webkit.org/show_bug.cgi?id=203404
+    soup_message_set_flags(msg, static_cast<SoupMessageFlags>(soup_message_get_flags(msg) | SOUP_MESSAGE_NEW_CONNECTION));
+
     soup_session_websocket_connect_async(session, msg, nullptr, protocols.get(), m_cancellable.get(),
         [] (GObject* session, GAsyncResult* result, gpointer userData) {
             GUniqueOutPtr<GError> error;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to