[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] wget-1.12.1-devel: 'Unsupported scheme' and windows pathn
From: |
Steven Schubiger |
Subject: |
Re: [Bug-wget] wget-1.12.1-devel: 'Unsupported scheme' and windows pathnames |
Date: |
Sat, 12 Dec 2009 15:14:38 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Ray Satiro <address@hidden> wrote:
> I checked the source and it appears that the 'unsupported scheme' error is
> caused because the path on windows can be misinterpreted as a URL. This
> traces back to retrieve_from_file() in src/retr.c.
>
> 1.12.1-devel retrieve_from_file() is different from 1.11.4 in the way it
> handles checking for a URL as the input file. Changes could be made to retr.c
> retrieve_from_file() or maybe url.c url_has_scheme(), which doesn't really
> validate any type of scheme.
>
> Attached is a patch that eliminates the check in retrieve_from_file() for
> url_has_scheme() and instead checks url_parse() to see determine if the input
> file is a URL. This is probably sufficient since url_parse() checks
> url_scheme().
I'd prefer patching url_has_scheme() to test for schemes more strictly;
the implementation would add a check for a double slash at the end of
the scheme and colon (which are part of the URL).
Attached a patch for review.
url.c.patch
Description: Text Data