[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lynx-dev] Question marks in local source filenames
From: |
David Woolley |
Subject: |
Re: [Lynx-dev] Question marks in local source filenames |
Date: |
Sun, 13 Feb 2022 13:32:34 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
On 13/02/2022 04:00, Thorsten Glaser wrote:
This is of course a bug, local filenames are unconstrained
other than not containing NUL and slash of course.
That's not true. They have the same constraints as the path part of any
URI:
RFC 8089
file-URI = file-scheme ":" file-hier-part
file-scheme = "file"
file-hier-part = ( "//" auth-path )
/ local-path
auth-path = [ file-auth ] path-absolute
local-path = path-absolute
file-auth = "localhost"
/ host
RFC 3986
path-absolute = "/" [ segment-nz *( "/" segment ) ]
segment = *pchar
segment-nz = 1*pchar
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "="
so ? is not permitted, unless % encoded. White space is also not
permitted. Individual filesystems may further restrict available
characters, e.g. Windows won't allow backslash.