W3C home > Mailing lists > Public > uri@w3.org > October 2002

Re: no parameter in first segment of relative URI?

From: Roy T. Fielding <fielding@apache.org>
Date: Fri, 11 Oct 2002 15:10:46 -0700
Cc: uri@w3.org
To: Martin Duerst <duerst@w3.org>
Message-Id: <4AF86AEB-DD66-11D6-87CB-000393753936@apache.org>

> Looking through the URI syntax in detail, I became aware
> of the following 'anomaly': parameters are not allowed
> in the first segment of a relative URI (if it doesn't start
> with a slash). The relevant rules are:
>
>  relativeURI   = ( net_path | abs_path | rel_path ) [ "?" query ]
>
>  net_path      = "//" authority [ abs_path ]
>  abs_path      = "/"  path_segments
>  rel_path      = rel_segment [ abs_path ]
>
>  rel_segment   = 1*( unreserved | escaped |
>                      ";" | "@" | "&" | "=" | "+" | "$" | "," )
>
>  path_segments = segment *( "/" segment )
>  segment       = *pchar *( ";" param )
>  param         = *pchar
>  pchar         = unreserved | escaped |
>                  ":" | "@" | "&" | "=" | "+" | "$" | ","
>
> So in "abc;def/ghi;jkl", 'jkl' is a parameter, but 'def' isn't.
> On the other hand, in "/abc;def/ghi;jkl", both 'def' and 'jkl'
> are parameters.
>
> Is this an error in the syntax, or can somebody explain this?

No, but I agree that it is confusing.  They are defined differently
because rel_segment cannot be empty.  Syntactically they are equivalent.
I'll find a better way to write it.

There was some debate over whether the notion of parameters should just
be removed completely.

....Roy
Received on Friday, 11 October 2002 18:17:50 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:04 UTC