Bug 217298 - [curl] WebSocket tests are failing since r267931
Summary: [curl] WebSocket tests are failing since r267931
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-04 14:31 PDT by Fujii Hironori
Modified: 2020-10-04 21:20 PDT (History)
8 users (show)

See Also:


Attachments
WIP patch (797 bytes, patch)
2020-10-04 14:58 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (1.78 KB, patch)
2020-10-04 17:43 PDT, Fujii Hironori
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2020-10-04 14:31:09 PDT
[curl] WebSocket test are failing since r267931

https://build.webkit.org/builders/WinCairo%2064-bit%20WKL%20Release%20%28Tests%29/builds/8810

Bug 217250 – "http:" should not be a valid URL
Comment 1 Fujii Hironori 2020-10-04 14:31:59 PDT
I guess `CurlStream::CurlStream` shouldn't use `setProtocol`.
>    urlForConnection.setProtocol(url.protocolIs("wss") ? "https" : "http");
Comment 2 Fujii Hironori 2020-10-04 14:58:44 PDT
Created attachment 410483 [details]
WIP patch
Comment 3 Fujii Hironori 2020-10-04 17:43:45 PDT
Created attachment 410491 [details]
Patch
Comment 4 Darin Adler 2020-10-04 20:45:42 PDT
Comment on attachment 410491 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=410491&action=review

> Source/WebCore/platform/network/curl/CurlStream.cpp:47
>      // Libcurl is not responsible for the protocol handling. It just handles connection.
>      // Only scheme, host and port is required.
> -    URL urlForConnection;
> -    urlForConnection.setProtocol(url.protocolIs("wss") ? "https" : "http");
> -    urlForConnection.setHostAndPort(url.hostAndPort());
> -    m_curlHandle->setUrl(urlForConnection);
> +    url.setProtocol(url.protocolIs("wss") ? "https" : "http");
> +    m_curlHandle->setUrl(WTFMove(url));

The code no longer matches the comment.
Comment 5 Fujii Hironori 2020-10-04 21:19:45 PDT
Committed r267954: <https://trac.webkit.org/changeset/267954>
Comment 6 Radar WebKit Bug Importer 2020-10-04 21:20:19 PDT
<rdar://problem/69940122>