On 30 Sep 2001, at 12:21, Q. Alex Zhao wrote:

> Hi, I'm using wget-1.7 and found a problem with uri_merge on slashdot
> pages.
> 
> Basically, slashdot likes to use something like
>     <IMG SRC="//images.slashdot.org/topics/topicwine.gif">
> Since the referring page is "http://slashdot.org/topics.shtml";,
> uri_merge returns
> "http://slashdot.org//images.slashdot.org/topics/topicwine.gif";, instead
> of the correct "http://images.slashdot.org/topics/topicwine.gif";.

Yes, that's definitely a bug in wget-1.7 (and wget-1.7.1-pre1). RFC 
2396 section 5 calls this type of relative URI a "network-path 
reference" (and notes that it is rarely used) so I suppose your 
patch should call it the same thing.
 
> I made some simeple changes to url.c to handle this problem. Thought
> you'd like to know.

Well done, but I don't think your patch (snipped) is general 
enough, as the bit at the front of the merged URL (the protocol or 
"scheme" part) is not always "http:" but should be copied from 
elsewhere.

Oh, and patches really should be sent to <[EMAIL PROTECTED]>

Regards,
Ian Abbott

Reply via email to