Mike Moran wrote:
Btw, I presume this is the algorithm given in section 5.2 of http://www.apache.org/~fielding/uri/rev-2002/rfc2396bis.html#absolutize? If so, this is just a draft (draft-fielding-uri-rfc2396bis-03.txt). It does actually differ from rfc2396 in how it handles abnormal URLs (though I think that's irrelevant here).

Yes, this is the algorithm. We decided to upgrade to ensure that URI parsing was consistent across Apache. I think this was at the request of Roy Fielding. Oleg, is that correct?


The string "my/relative/../../another/relative" would never be output from merge() or given to remove_dot_segments() in the section 5.2 algorithm. If you are just applying remove_dot_segments() to this string then it will get confused and output a wierd answer because it's not expecting that input (ie a path that doesn't have a "/" at the start).
>
I may be wrong, but I didn't think normalization could be applied to anything but absolute URLs.

I agree that when resolving a path relative to a base URI a relative path should never be passed to remove_dot_segments(). However, according to section 6.2.2.3 remove_dot_segments() can be used for path segment normalization.


I guess what is comes down to is that normalization is meant to generate a URI with a valid absolute path. The value output in this case is a little strange but I think it's correct. Essentially normalize should not be used on relative URIs.

Mike


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to