-
Notifications
You must be signed in to change notification settings - Fork 115
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
Revert integration of URL parser for ICE servers from Recommendation text #2997
Comments
It's not clear to me that there is any test possible for the change - I don't think there's an URL that should be considered invalid before and valid after or vice versa. Similarly, it is not clear to me that something that parses according to the URL spec wouldn't parse equally under the libwebrtc code - and "specs specify behavior, not implementation". Can you think of anything that would validate the change? |
to give an example specific to my recent PR (IIUC): https://mottikumar3.medium.com/url-inter-op-d93689805c21 and #2660 (comment) may be a source of ideas for more generic differences emerging from using the URL parser. |
is it the ?& ("there's an empty nameless thing here") that doesn't parse? |
If I read the following libwebrtc code correctly, indeed: std::vector<absl::string_view> tokens = rtc::split(url, '?');
absl::string_view uri_without_transport = tokens[0];
// Let's look into transport= param, if it exists.
if (tokens.size() == kTurnTransportTokensNum) { // ?transport= is present.
std::vector<absl::string_view> transport_tokens =
rtc::split(tokens[1], '=');
if (transport_tokens[0] != kTransport) { ( |
maybe relevant WPT test data for URL parsing (the stun and turn URLs it contains aren't probably the most relevant since they would not be acceptable in a WebRTC context) |
there is I think a better alternative to reverting the integration of URL parsing: we can leave it as a candidate correction, as long as we factor that particular algorithm out of the set configuration algorithm; I'll prepare a PR in that direction after #2996 is merged. (this doesn't obviate the need for tests, which I'll take a stab at) |
seems good to me. The logical place for testing more valid / invalid URIs would be this test: webrtc/RTCConfiguration-iceServers.html |
see w3c/webrtc-pc#2853 and related discussions in w3c/webrtc-pc#2997 (comment)
Running web-platform-tests/wpt#47959 locally shows quite a number of cases where implementations fail due to not using the expected URL parser (both because they're too lax and too lenient). It also highlights what I think are likely bugs in the spec:
I'm pretty sure there would be valuable insights in detecting bugs further down the line in how server hostnames are passed to the ICE agent (which we could detect via |
Complete integration of URL parser from #2853 see also #2997 (comment) This aligns with the constraints set in the respective RFC (and thus with the current WebRTC Rec)
Complete integration of URL parser from #2853 see also #2997 (comment) This aligns with the constraints set in the respective RFC (and thus with the current WebRTC Rec)
I've submitted #2998 to address these |
Complete integration of URL parser from #2853 see also #2997 (comment) This aligns with the constraints set in the respective RFC (and thus with the current WebRTC Rec)
In #2853 (to be completed with #2996) we replaced the algorithm to parse an ICE server url to use the WHATWG URL parser. While that change isn't controversial, it isn't backed by any test. I don't know if there is any implementation, but it doesn't look like libwebrtc implementation does this.
As we're preparing to re-publish the WebRTC Recommendation, and as this particular amendment is meshed within other actually implemented amendments (#2689, #2691), I think we should back out that particular amendment until that republication has happened.
The text was updated successfully, but these errors were encountered: