Subject: bug#8622: 24.0.50; url-parse does not implement RFC3986 5.2

From: Lars Magne Ingebrigtsen <[email-masked]>
Date: Sun, 11 Sep 2011 17:20:32 +0200

Julien Danjou <[email-masked]> writes:

>> Julien Danjou <[email-masked]> writes:
>>
>>> URL listed in 5.4.1 and 5.4.2 does not work such as:
>>>
>>>       "../../../g"    =  "http://a/g"
>>
>> Where does the "a" come from?
>
> Read:
>
>        "http://a/../../../g"    =  "http://a/g"

5.2 talks about relative URLs, though, so "http://a/../../../g" seems
irrelevant...

5.4.1 also talks about relative URLs, and how to resolve them if you
have a base address.  But `url-generic-parse-url' does not, as far as I
can tell, deal with the concept of "relative URLs and bases", but only
parses full, non-relative URLs.

And for a full URL, this looks correct to me:

(url-generic-parse-url "http://a/../../../g")
=>
[cl-struct-url "http" nil nil "a" 80 "/../../../g" nil nil t nil]

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/