Re: [whatwg/url] A '@' character in the host part of file URLs (Issue #805)

> > I doubt many URL parsers are going to interpret file://webdavserver.net@ssl/ as having a hostname containing an @ sign
> 
> Firefox, Safari, windows explorer, linux terminals all handle the URL fine

Safari also rejects this URL, and the only reason it works in Firefox is that we currently ignore everything in the hostname part of a file URL (tracked in [1507354 - URL parser discards host for file URLs](https://bugzilla.mozilla.org/show_bug.cgi?id=1507354) 

Allowing `@` only in the authority section of file URLs seems like a weird exception to make.
I'm in favor of keeping hostname parsing as close to the HTTP url parser as possible - and here the @ sign should probably be percent encoded.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/805#issuecomment-2382400697
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/url/issues/805/2382400697@github.com>

Received on Monday, 30 September 2024 08:08:28 UTC