Bug 247149 - WebSocket: Allow relative URLs and http(s) scheme
Summary: WebSocket: Allow relative URLs and http(s) scheme
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Other
Hardware: All All
: P2 Normal
Assignee: Anne van Kesteren
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-10-27 13:52 PDT by me
Modified: 2023-08-14 06:54 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 Radar WebKit Bug Importer 2022-11-03 13:53:19 PDT
<rdar://problem/101929623>
Comment 2 Alex Christensen 2022-11-04 14:05:47 PDT
This is significantly different than Firefox's approach.

I think Anne's comment "If we accept HTTP(S) schemes though we probably first want to normalize them to ws/wss, for the sake of consistency with the existing url getter" is interesting and should be considered.

Tests need updating.
Comment 3 me 2022-11-04 14:24:19 PDT
(In reply to Alex Christensen from comment #2)
> This is significantly different than Firefox's approach.
> 
> I think Anne's comment "If we accept HTTP(S) schemes though we probably
> first want to normalize them to ws/wss, for the sake of consistency with the
> existing url getter" is interesting and should be considered.
> 
> Tests need updating.

I tested both against the same site and they behaved as expected, although slight deviations may exist? I have a pr against WPT which should help with ensuring things are working as expected. I don't know the exact processes but once that is merged I'll need help rolling wpt so this patch can be tested properly.

I thought it made more sense for the url getter to reflect the url that was passed in so it is not normalized. Do you feel strongly that it should be?
Comment 4 Anne van Kesteren 2023-05-11 03:07:30 PDT
Pull request: https://github.com/WebKit/WebKit/pull/13751
Comment 5 EWS 2023-05-11 08:16:05 PDT
Committed 263968@main (b5e7897d6636): <https://commits.webkit.org/263968@main>

Reviewed commits have been landed. Closing PR #13751 and removing active labels.