Bug 217170

Summary: Copy host from base file URL
Product: WebKit Reporter: Anne van Kesteren <annevk>
Component: DOMAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, benjamin, cdumez, clopez, cmarcelo, ews-watchlist, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch beidson: review+

Description Anne van Kesteren 2020-10-01 03:00:46 PDT
See https://github.com/whatwg/url/pull/544 and new tests at https://github.com/web-platform-tests/wpt/pull/25716.

Safari does not copy the host from the base URL for file URLs.
Comment 1 Alex Christensen 2020-10-01 15:23:51 PDT
Created attachment 410276 [details]
Patch
Comment 2 EWS Watchlist 2020-10-01 15:24:36 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 3 Alex Christensen 2020-10-01 16:37:33 PDT
Created attachment 410281 [details]
Patch
Comment 4 Alex Christensen 2020-10-01 23:13:45 PDT
Comment on attachment 410281 [details]
Patch

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

> Source/WTF/wtf/URLParser.cpp:1563
> +                    copyURLPartsUntil(base, URLPart::SchemeEnd, c, nonUTF8QueryEncoding);

Note: this code does not have a corresponding case that copies until URLPart::PortEnd because we are transitioning to State::FileHost and we don't want to copy the host of the base URL here.  The other cases do if there is one.
Comment 5 Alex Christensen 2020-10-02 13:59:23 PDT
http://trac.webkit.org/r267896
Comment 6 Radar WebKit Bug Importer 2020-10-02 14:00:25 PDT
<rdar://problem/69895958>