-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow HTTP(S) schemes in the WebSocket constructor #45
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
And thereby relative URLs. They are instantly normalized to the ws: and wss: schemes. Tests: web-platform-tests/wpt#39955. Closes #37.
This was referenced May 11, 2023
Mozilla is supportive of this change. |
This was referenced May 11, 2023
webkit-commit-queue
pushed a commit
to annevk/WebKit
that referenced
this pull request
May 11, 2023
https://bugs.webkit.org/show_bug.cgi?id=247149 rdar://101929623 Reviewed by Antti Koivisto. This implements the change proposed at whatwg/websockets#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 web-platform-tests/wpt#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
ricea
reviewed
May 12, 2023
Co-authored-by: Adam Rice <[email protected]>
ricea
approved these changes
May 12, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
zcorpan
added a commit
to web-platform-tests/wpt
that referenced
this pull request
May 16, 2023
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
May 22, 2023
…WebSocket, a=testonly Automatic update from web-platform-tests Test base URL with multiple globals for WebSocket See whatwg/websockets#45 -- wpt-commits: 9d415b811587ee14cd3d06a477ca98e26cb04929 wpt-pr: 39978
ErichDonGubler
pushed a commit
to erichdongubler-mozilla/firefox
that referenced
this pull request
May 23, 2023
…WebSocket, a=testonly Automatic update from web-platform-tests Test base URL with multiple globals for WebSocket See whatwg/websockets#45 -- wpt-commits: 9d415b811587ee14cd3d06a477ca98e26cb04929 wpt-pr: 39978
lpinca
added a commit
to websockets/ws
that referenced
this pull request
Aug 20, 2023
lpinca
added a commit
to websockets/ws
that referenced
this pull request
Aug 20, 2023
Allow HTTP(S) URLs to be used in the WebSocket constructor. They are immediately converted to the ws and wss schemes. Refs: whatwg/websockets#45
lpinca
added a commit
to websockets/ws
that referenced
this pull request
Aug 20, 2023
Allow HTTP(S) URLs to be used in the WebSocket constructor. They are immediately converted to the ws and wss schemes. Refs: whatwg/websockets#45
lpinca
added a commit
to websockets/ws
that referenced
this pull request
Aug 28, 2023
Allow HTTP(S) URLs to be used in the WebSocket constructor. They are immediately converted to the ws and wss schemes. Refs: whatwg/websockets#45
3 tasks
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
And thereby relative URLs. They are instantly normalized to the ws: and wss: schemes.
Tests: web-platform-tests/wpt#39955.
(See WHATWG Working Mode: Changes for more details.)
Preview | Diff