Seeking wisdom on URI path parameters.

Steven Taschuk staschuk at telusplanet.net
Fri May 30 15:48:16 EDT 2003


Quoth JanC:
  [...]
> In 3.3.: "Each path segment may include a sequence of parameters, indicated 
> by the semicolon ';' character."
> --> note the use of "include".
> 
> In 5. it says: "Within a relative-path reference, the complete path segments 
> '.' and '..' have special meanings: 'the current hierarchy level' and 'the 
> level above this hierarchy level', respectively."
> --> _complete_ segment must be '.' or '..'
> 
> So I would say:
> http://localhost/dir;im_ignoring=this/subdir;and=this/.;param=value/foo.html
> (whatever that may mean to the web server...)
> 
> And that's also exactly what the example algorithm does.

Indeed.  But as the OP pointed out, in section 3.3 it is written
that "parameters are not significant to the parsing of relative
references".  With the above behaviour -- which I agree is a
reasonable reading of the RFC -- they are significant, since they
make the difference between '.' (which is treated specially) and
'.;param=value' (which is not).  (They're also significant the
other way, of course.)

I read "complete" in "complete segment" as possibly intended to
emphasize that, e.g., '.foo' and '..bar' are not special as path
components.  Note the related examples in the appendix:

   Similarly, parsers must avoid treating "." and ".." as special when
   they are not complete components of a relative path.

      /./g          =  http://a/./g
      /../g         =  http://a/../g
      g.            =  http://a/b/c/g.
      .g            =  http://a/b/c/.g
      g..           =  http://a/b/c/g..
      ..g           =  http://a/b/c/..g

It would have been nice if the appendix had included an example
such as ".;param=value/whatever" to make this point unambiguous.

-- 
Steven Taschuk                           staschuk at telusplanet.net
"I'm always serious, never more so than when I'm being flippant."
                            -- _Look to Windward_, Iain M. Banks





More information about the Python-list mailing list