[webkit-changes] [WebKit/WebKit] b5e789: WebSocket: Allow relative URLs and http(s) scheme

Anne van Kesteren noreply at github.com
Thu May 11 08:16:11 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b5e7897d6636c7fb1c25ff7a01d6c876552dc916
      https://github.com/WebKit/WebKit/commit/b5e7897d6636c7fb1c25ff7a01d6c876552dc916
  Author: Anne van Kesteren <annevk at annevk.nl>
  Date:   2023-05-11 (Thu, 11 May 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/http/tests/websocket/tests/hybi/url-parsing-expected.txt
    M LayoutTests/http/tests/websocket/tests/hybi/url-parsing.html
    A LayoutTests/imported/w3c/web-platform-tests/websockets/Create-http-urls.any-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/websockets/Create-http-urls.any.html
    A LayoutTests/imported/w3c/web-platform-tests/websockets/Create-http-urls.any.js
    A LayoutTests/imported/w3c/web-platform-tests/websockets/Create-http-urls.any.worker-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/websockets/Create-http-urls.any.worker.html
    A LayoutTests/imported/w3c/web-platform-tests/websockets/Create-invalid-urls.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/websockets/Create-invalid-urls.any.html
    M LayoutTests/imported/w3c/web-platform-tests/websockets/Create-invalid-urls.any.js
    A LayoutTests/imported/w3c/web-platform-tests/websockets/Create-invalid-urls.any.worker-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/websockets/Create-invalid-urls.any.worker.html
    R LayoutTests/imported/w3c/web-platform-tests/websockets/Create-invalid-urls.any.worker_wss-expected.txt
    R LayoutTests/imported/w3c/web-platform-tests/websockets/Create-invalid-urls.any_wss-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/websockets/Create-non-absolute-url.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/websockets/Create-non-absolute-url.any.html
    M LayoutTests/imported/w3c/web-platform-tests/websockets/Create-non-absolute-url.any.js
    A LayoutTests/imported/w3c/web-platform-tests/websockets/Create-non-absolute-url.any.worker-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/websockets/Create-non-absolute-url.any.worker.html
    R LayoutTests/imported/w3c/web-platform-tests/websockets/Create-non-absolute-url.any.worker_wss-expected.txt
    R LayoutTests/imported/w3c/web-platform-tests/websockets/Create-non-absolute-url.any_wss-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/websockets/Create-url-with-windows-1252-encoding-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/websockets/Create-url-with-windows-1252-encoding.html
    R LayoutTests/imported/w3c/web-platform-tests/websockets/Create-wrong-scheme.any.html
    R LayoutTests/imported/w3c/web-platform-tests/websockets/Create-wrong-scheme.any.js
    R LayoutTests/imported/w3c/web-platform-tests/websockets/Create-wrong-scheme.any.worker.html
    R LayoutTests/imported/w3c/web-platform-tests/websockets/Create-wrong-scheme.any.worker_wss-expected.txt
    R LayoutTests/imported/w3c/web-platform-tests/websockets/Create-wrong-scheme.any_wss-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/websockets/constants.sub.js
    R LayoutTests/imported/w3c/web-platform-tests/websockets/constructor/002-expected.txt
    R LayoutTests/imported/w3c/web-platform-tests/websockets/constructor/002.html
    R LayoutTests/imported/w3c/web-platform-tests/websockets/constructor/002_wss-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/websockets/constructor/w3c-import.log
    M LayoutTests/imported/w3c/web-platform-tests/websockets/w3c-import.log
    M LayoutTests/platform/glib/TestExpectations
    M Source/WebCore/Modules/websockets/WebSocket.cpp

  Log Message:
  -----------
  WebSocket: Allow relative URLs and http(s) scheme
https://bugs.webkit.org/show_bug.cgi?id=247149
rdar://101929623

Reviewed by Antti Koivisto.

This implements the change proposed at https://github.com/whatwg/websockets/pull/45, allowing HTTP(S) URLs to be used in the WebSocket constructor. They are immediately converted to use ws: or wss: schemes. It also ensures that the HTTP(S) URLs always use UTF-8 for the query component of the URL, as is expected.

The test changes are being upstreamed via https://github.com/web-platform-tests/wpt/pull/39955.

* LayoutTests/TestExpectations:
* LayoutTests/http/tests/websocket/tests/hybi/url-parsing-expected.txt:
* LayoutTests/http/tests/websocket/tests/hybi/url-parsing.html:
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-http-urls.any-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-http-urls.any.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-http-urls.any.js: Added.
(test):
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-http-urls.any.worker-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-http-urls.any.worker.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-invalid-urls.any-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-invalid-urls.any.html:
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-invalid-urls.any.js:
(string_appeared_here.forEach.input.test):
(test): Deleted.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-invalid-urls.any.worker-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-invalid-urls.any.worker.html:
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-invalid-urls.any.worker_wss-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-invalid-urls.any_wss-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-non-absolute-url.any-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-non-absolute-url.any.html:
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-non-absolute-url.any.js:
(forEach.input.test):
(test): Deleted.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-non-absolute-url.any.worker-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-non-absolute-url.any.worker.html:
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-non-absolute-url.any.worker_wss-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-non-absolute-url.any_wss-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-url-with-windows-1252-encoding-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-url-with-windows-1252-encoding.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-wrong-scheme.any.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-wrong-scheme.any.js: Removed.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-wrong-scheme.any.worker.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-wrong-scheme.any.worker_wss-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/websockets/Create-wrong-scheme.any_wss-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/websockets/constants.sub.js:
(CreateWebSocketNonAbsolute): Deleted.
(CreateWebSocketNonWsScheme): Deleted.
* LayoutTests/imported/w3c/web-platform-tests/websockets/constructor/002-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/websockets/constructor/002.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/websockets/constructor/002_wss-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/websockets/constructor/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/websockets/w3c-import.log:
* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::create):
(WebCore::WebSocket::connect):

Canonical link: https://commits.webkit.org/263968@main




More information about the webkit-changes mailing list