Re:How the URL Was Built
by account42 on Monday October 12, 2020 @03:47AM
(#24752295)
The EBNF in appendix A does not allow any spaces. Specifically, there is also this section in RFC 3986.
> 2.4.3. Excluded US-ASCII Characters
> Although they are disallowed within the URI syntax, we include here a description of those US-ASCII characters that have been excluded and the reasons for their exclusion.
[...]
> space = <US-ASCII coded character 20 hexadecimal>
You can certainly encode spaces in URLs but the URL will not contain spaces.
The regular expression in appendix B is irrelevant because it assumes a well-formed URL so spaces do not need to be explicitly excluded.
And at the protocol level you certainly can't use spaces in URLs (in HTTP 1.1) because the request line uses spaces to delimit the URL or path.
> 2.4.3. Excluded US-ASCII Characters
> Although they are disallowed within the URI syntax, we include here a description of those US-ASCII characters that have been excluded and the reasons for their exclusion.
[...]
> space = <US-ASCII coded character 20 hexadecimal>
You can certainly encode spaces in URLs but the URL will not contain spaces.
The regular expression in appendix B is irrelevant because it assumes a well-formed URL so spaces do not need to be explicitly excluded.
And at the protocol level you certainly can't use spaces in URLs (in HTTP 1.1) because the request line uses spaces to delimit the URL or path.