This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: wget bug?


First of all excuse me if this already has been discussed ad libitum.
But I'm only on the digest list 8-(

cygwin-digest-help@sources.redhat.com wrote:
> Subject: Re: wget bug?
> Date: Fri, 09 Mar 2001 09:53:35 -0500
> From: "Charles S. Wilson" <cwilson@ece.gatech.edu>
> To: d94-llu@nada.kth.se
> CC: cygwin@sources.redhat.com
> 
> Thanks for the patch.  However, you should probably do something like:
> #if defined(WIN32) || defined(__CYGWIN__)
>   your code
> #endif
> 
> Can you regenerate the patch with those changes and send it both to me,
> and to the official wget maintainer or mailing list (go to www.gnu.org
> to find out how to report patches for wget).
> 
> Thanks,
> --Chuck
> 
> d94-llu@nada.kth.se wrote:
> >
> > I found where to change all ? to _.
> >
> > This is an ugly solution not checking that FS is NTFS or anything such. Also
> > other protocols (ftp) should be fixed.

I think url.c is a better place to check for this. Not only that I
actually submited a quick hack for working around this but your is more
general.
http://www.mail-archive.com/wget@sunsite.dk/msg00190.html

But this was turned down. I'm not aware of any archive of the wget-patch
list. So: 
	"Thanks for the patch, but I think I'll refrain from applying
	it for now.  We really should have a more general solution for
	mapping of remote file names to local file names.  Until then,
	the makers of Windows binaries can cons up a similar patch to
	remove disallowed characters from Windows file systems."


If submiting patches to wget please take a look at the Development
section on the wget web-site:
http://sunsite.dk/wget/wgetdev.html

> >
> > Small patch:
> >
> > /usr/local/src/wget-1.6/src$ diff http.c http2.c
> > 749a750,762
> > >       /* Windows doesn't (always) allow /\:*?"<>| in filenames,
> > >          Change to _ and pray for none name-clashes.
> > >          But / and \ are path-indicators. Leave them.
> > >          Leif Lundgren, 2001-03-09
> > >        */
> > >       {
> > >               int i;
> > >               const char bad_chars[] = ":*?\"<>|";
> > >               for ( i=0; u->local[i] != '\0'; i++ )
> > >                       if ( strchr( bad_chars, u->local[i] ) != NULL )
> > >                               u->local[i] = '_';
> > >       }
> > >
> >
> > At  Fri, 09 Mar 2001 12:59:12 +0100 (MET) Leif Lundgren wrote:
> > >
> > > I think I have discoved a bug in the port of wget. (Version 1.6)
> > >
> > > If you download an url containing a '?' you get an error. wget tries to
> > > create a file containing a '?'.
> > >
> > > Example:
> > > wget "http://search.altavista.com/cgi-bin/query?
> > > q=cygwin&kl=XX&pg=q&Translate=on"
> > >
> > > Does the rest of the world have the same problem?
> > >
> > > Regards
> > >   Leif Lundgren
> > >
> > >



Feel free to CC me when answering as I'm only on the digest list 8-)

-- 
Med venlig hilsen / Kind regards

Hack Kampbjørn               hack@hackdata.com
HackLine                     +45 2031 7799

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]