On Thu, 2025-02-20 at 23:38 -0600, robert engels wrote:
> Also, see https://datatracker.ietf.org/doc/html/rfc2396#section-3 for
> more details on the scheme + authority.


The BNF is (including only the parts that are necessary to show
validity):

absoluteURI   = scheme ":" ( hier_part | opaque_part )
hier_part     = ( net_path | abs_path ) [ "?" query ]
abs_path      = "/"  path_segments
path_segments = segment *( "/" segment )
segment       = *pchar *( ";" param )
param         = *pchar
pchar         = unreserved | escaped |
                ":" | "@" | "&" | "=" | "+" | "$" | ","

The original URI (I miswrote URL for URI in my last post — the
url.Parse documentation notes "technically, a URI reference") was
"http:/127.0.0.1/index.html" which can be broken into:

scheme   = http
abs_path = /127.0.0.1/index.html

The url.Parse function doesn't examine semantics, that's the caller's
responsibility. The semantics here are clearly wrong, but it's up to
the caller to check and ensure that the passed value satisfies the
expectations.


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/e5d3b0bf3f9c51c18b4170fc2b15bfae469cf57f.camel%40kortschak.io.

Reply via email to