Bug 170117 - WebSocket: don't throw for bad ports
Summary: WebSocket: don't throw for bad ports
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-27 07:54 PDT by Anne van Kesteren
Modified: 2023-04-05 10:04 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anne van Kesteren 2017-03-27 07:54:49 PDT
Instead, let the network layer handle all security checks and fail asynchronously. No need to duplicate them.

Test: https://github.com/w3c/web-platform-tests/issues/5212.
Comment 1 Chris Dumez 2017-04-04 16:37:51 PDT
The code change seems simple but Firefox / Chrome and Safari all throw here.
Comment 2 Chris Dumez 2017-04-04 16:39:09 PDT
Will re-evaluate if other browsers actually implement this. But for now, I am not inclined to change our behavior.
Comment 3 youenn fablet 2017-04-04 18:15:24 PDT
(In reply to Chris Dumez from comment #2)
> Will re-evaluate if other browsers actually implement this. But for now, I
> am not inclined to change our behavior.

This seems to add some flexibility in where we could do the checks.
If we want to keep checks at WebCore level, this might allow making things more consistent should the network layer add additional port restrictions.
This makes sense to me.
Comment 4 Anne van Kesteren 2023-04-05 10:04:24 PDT
This was implemented at some point. We pass the relevant tests.