Wget don't work properly when the URL contains characters which are not
allowed in file names
on the file system which is currently used. These are often '\', '?', '*'
and ':'.

Affected are at least:
- Windows and related OS
- Linux when using FAT or Samba as file system

Possibilty to solve:

On startup try to built files

mkdir "wget.tmpfile"
for ( i = 0x20; i <= 0x7E; i++ ) {
    sprintf ( name, "wget.tmpfile/\%c", i );
    test to open for read as file =>  okay, then this char is avaialble for
file names
    test to create                =>  okay, then this char is avaialble for
file names
    remove file
}
remove dir "wget.tmpfile"

chars which are not available are escaped as @3F or #3F or stuff like that.


============= Example ====================================================
--14:51:11--  http://fan.theonering.net/rolozo/?view=collection
           => `fan.theonering.net/rolozo/index.html?view=collection'
Connecting to kdejenspi01.zeiss.de[10.2.39.56]:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [text/html]
fan.theonering.net/rolozo/index.html?view=collection: Invalid argument

Cannot write to `fan.theonering.net/rolozo/index.html?view=collection'
(Invalid argument).
Removing fan.theonering.net/rolozo/index.html?view=collection since it
should be rejected.
unlink: Invalid argument
--14:51:12--  http://fan.theonering.net/rolozo/?view=quotes
           => `fan.theonering.net/rolozo/index.html?view=quotes'
Connecting to kdejenspi01.zeiss.de[10.2.39.56]:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [text/html]
fan.theonering.net/rolozo/index.html?view=quotes: Invalid argument

Cannot write to `fan.theonering.net/rolozo/index.html?view=quotes' (Invalid
argument).
Removing fan.theonering.net/rolozo/index.html?view=quotes since it should
be rejected.
unlink: Invalid argument
--14:51:13--  http://fan.theonering.net/rolozo/?view=about
           => `fan.theonering.net/rolozo/index.html?view=about'
Connecting to kdejenspi01.zeiss.de[10.2.39.56]:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [text/html]
fan.theonering.net/rolozo/index.html?view=about: Invalid argument
================================================================================================

--
Frank Klemm
AIM Advanced Imaging Microscopy
phone: +49 (36 41) 64-27 21
fax: +49 (36 41) 64-31 44
mailto:[EMAIL PROTECTED]



Reply via email to