URLs in request lines

Sean Conner sean at conman.org
Fri Sep 13 22:06:02 BST 2019
It was thus said that the Great plugd once stated:
> Sean Conner writes:
> >   A related problem is a relative URL like:
> >
> > 	/test/torture/../../test/./torture/../../../../test/./././torture/./0022
> >
> >   That collapses down to:
> >
> > 	/test/torture/0022
> >
> > but in this case, I think it would be the responsibiliy of the *client* to
> > collapse the first into the second (and then add the scheme, host, etc.).  I
> > know my own server does the collapsing, but I think I may change that.
> 
> Fair enough.  The URL library elpher uses doesn't automatically do this,
> but it seems simple enough to do (famous last words)..

  The algorithm for that is described in  RFC-3986, section 5.2.4.  If you
can handle the examples from the RFC, you should be good to go.

  -spc



Archive home | About this archive