Diff
Modified: trunk/LayoutTests/ChangeLog (249134 => 249135)
--- trunk/LayoutTests/ChangeLog 2019-08-27 07:38:41 UTC (rev 249134)
+++ trunk/LayoutTests/ChangeLog 2019-08-27 08:42:06 UTC (rev 249135)
@@ -1,3 +1,19 @@
+2019-08-27 Carlos Garcia Campos <[email protected]>
+
+ Origin header not included in WebSocket handshake request when using platform WebSocket API
+ https://bugs.webkit.org/show_bug.cgi?id=200535
+
+ Reviewed by Youenn Fablet.
+
+ Rebaseline tests that are passing now for GTK and WPE.
+
+ * platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/003-expected.txt: Added.
+ * platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/003-sets-origin.worker-expected.txt:
+ * platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/005-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/003-expected.txt: Added.
+ * platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/003-sets-origin.worker-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/005-expected.txt:
+
2019-08-26 Myles C. Maxfield <[email protected]>
[WHLSL] Rewrite all tests to use WHLSL and delete the isWHLSL flag
Added: trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/003-expected.txt (0 => 249135)
--- trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/003-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/003-expected.txt 2019-08-27 08:42:06 UTC (rev 249135)
@@ -0,0 +1,3 @@
+
+PASS WebSockets: origin
+
Modified: trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/003-sets-origin.worker-expected.txt (249134 => 249135)
--- trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/003-sets-origin.worker-expected.txt 2019-08-27 07:38:41 UTC (rev 249134)
+++ trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/003-sets-origin.worker-expected.txt 2019-08-27 08:42:06 UTC (rev 249135)
@@ -1,3 +1,3 @@
-FAIL origin set in a Worker assert_unreached: Reached unreachable code
+PASS origin set in a Worker
Modified: trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/005-expected.txt (249134 => 249135)
--- trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/005-expected.txt 2019-08-27 07:38:41 UTC (rev 249134)
+++ trunk/LayoutTests/platform/gtk/imported/w3c/web-platform-tests/websockets/opening-handshake/005-expected.txt 2019-08-27 08:42:06 UTC (rev 249135)
@@ -1,5 +1,3 @@
-Harness Error (TIMEOUT), message = null
+PASS WebSockets: proper first line
-TIMEOUT WebSockets: proper first line Test timed out
-
Added: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/003-expected.txt (0 => 249135)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/003-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/003-expected.txt 2019-08-27 08:42:06 UTC (rev 249135)
@@ -0,0 +1,3 @@
+
+PASS WebSockets: origin
+
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/003-sets-origin.worker-expected.txt (249134 => 249135)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/003-sets-origin.worker-expected.txt 2019-08-27 07:38:41 UTC (rev 249134)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/003-sets-origin.worker-expected.txt 2019-08-27 08:42:06 UTC (rev 249135)
@@ -1,3 +1,3 @@
-FAIL origin set in a Worker assert_unreached: Reached unreachable code
+PASS origin set in a Worker
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/005-expected.txt (249134 => 249135)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/005-expected.txt 2019-08-27 07:38:41 UTC (rev 249134)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/websockets/opening-handshake/005-expected.txt 2019-08-27 08:42:06 UTC (rev 249135)
@@ -1,5 +1,3 @@
-Harness Error (TIMEOUT), message = null
+PASS WebSockets: proper first line
-TIMEOUT WebSockets: proper first line Test timed out
-
Modified: trunk/Source/WebCore/ChangeLog (249134 => 249135)
--- trunk/Source/WebCore/ChangeLog 2019-08-27 07:38:41 UTC (rev 249134)
+++ trunk/Source/WebCore/ChangeLog 2019-08-27 08:42:06 UTC (rev 249135)
@@ -1,3 +1,15 @@
+2019-08-27 Carlos Garcia Campos <[email protected]>
+
+ Origin header not included in WebSocket handshake request when using platform WebSocket API
+ https://bugs.webkit.org/show_bug.cgi?id=200535
+
+ Reviewed by Youenn Fablet.
+
+ Add Origin HTTP header to the WebSocket handshake request.
+
+ * Modules/websockets/ThreadableWebSocketChannel.cpp:
+ (WebCore::ThreadableWebSocketChannel::webSocketConnectRequest):
+
2019-08-27 Youenn Fablet <[email protected]>
Make MediaStreamTrackPrivate RefCounted
Modified: trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp (249134 => 249135)
--- trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp 2019-08-27 07:38:41 UTC (rev 249134)
+++ trunk/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp 2019-08-27 08:42:06 UTC (rev 249135)
@@ -110,6 +110,7 @@
request.setHTTPUserAgent(document.userAgent(validatedURL->url));
request.setDomainForCachePartition(document.domainForCachePartition());
request.setAllowCookies(validatedURL->areCookiesAllowed);
+ request.setHTTPHeaderField(HTTPHeaderName::Origin, document.securityOrigin().toString());
// Add no-cache headers to avoid compatibility issue.
// There are some proxies that rewrite "Connection: upgrade"