ebook icon indicating copy to clipboard operation
ebook copied to clipboard

BNF for URIs

Open Mathieu-COSYNS-Student opened this issue 2 years ago • 2 comments

In the Hypertext Transfer Protocol section, there is a subset of the BNF for URIs. It's a subset, it's not the full description of all URIs but I found it odd that the query and the fragment are included twice.

URI           = scheme ":" "//" authority path [ "?" query ] [ "#" fragment ]
scheme        = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
authority     = [ userinfo "@" ] host [ ":" port ]
query         = *( pchar / "/" / "?" )                                             <----------- HERE -----------
fragment      = *( pchar / "/" / "?" )                                             <----------- HERE -----------
pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
query         = *( pchar / "/" / "?" )                                             <----------- HERE -----------
fragment      = *( pchar / "/" / "?" )                                             <----------- HERE -----------
pct-encoded   = "%" HEXDIG HEXDIG
unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
reserved      = gen-delims / sub-delims
gen-delims    = ":" / "/" / "?" / "#" / "[" / "]" / "@"
sub-delims    = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="

Mathieu-COSYNS-Student avatar May 19 '22 08:05 Mathieu-COSYNS-Student

Agreed, this is an error, feel free to propose an updated text

obonaventure avatar May 20 '22 21:05 obonaventure

The error is still there, and there is another inconsistency, the URI scheme that is proposed requires "//", it is also mentioned in the text that The characters : and // follow the scheme of any URI. but then in the URN example in the footnote there is no "//": urn:isbn:0-380-81593-1

leonardomaccari avatar Oct 13 '23 09:10 leonardomaccari