bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] wget-1.12.1-devel: 'Unsupported scheme' and windows pathnames


From: Ray Satiro
Subject: [Bug-wget] wget-1.12.1-devel: 'Unsupported scheme' and windows pathnames
Date: Thu, 10 Dec 2009 20:01:14 -0800 (PST)

Hello,

This is a follow up to my message from October 2009 re successful 
wget-1.12.1-devel mingw compile. We have since pushed that build out as an 
optional supplemental utility for the GetGnuWin32 downloader.

I notice that there is a bug when specifying an input file. If I try something 
like this it fails:
-------
C:\Users\Internet\Desktop>wget-1.12 -N -i "C:\users\internet\desktop\link.txt"
C:/users/internet/desktop/link.txt: Unsupported scheme `C'.
No URLs found in C:/users/internet/desktop/link.txt.
-------

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().


Thanks,

Jay Satiro on behalf of GetGnuWin32 project




      

Attachment: retr.c.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]