-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Александр Вильнин wrote: > Hello! > > I've noticed some posible mistake in "ftp-basic.c". > > When I try to download a file from > "ftp://www.delorie.com/pub/djgpp/current/" (in my case it was > "ftp://www.delorie.com/pub/djgpp/current/FILES") server responce error > no.550. But this file actually exists. > I've used > (wget --verbose --debug --output-file=wget_djgpp_log > --directory-prefix=djgpp "ftp://www.delorie.com/pub/djgpp/current/FILES") > cygwin command to get this file. > > In function ftp_request (ftp-basic.c) newline's characters are > substituted on ' ', but ftp-server doesn't understand such commands. > SIZE and RETR commands do not pass. > I've insert debug log at the end of this message.
The problem isn't that newlines are substituted. Newlines and carriage returns are simply not safe within FTP file names. However, how did the newline get there in the first place? The real file name itself doesn't have a newline in it. The logs clearly show that Wget was passed a URL with a carriage return (not newline) in it. This strongly indicates that the shell you were using passed it that way to Wget. Probably, the shell was given "\r\n" when you hit <Enter> to end your command, and stripped away the \n but left the \r, which it passed to Wget. The bug you are encountering is in your Cygwin+shell environment; you'll have to look to there. The only deficiency I'm seeing on Wget's part from these logs, is that it's calling \015 a "newline character", when in fact the newline character is \012; it should say "line-ending character" or some such. - -- HTH, Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer. GNU Maintainer: wget, screen, teseq http://micah.cowan.name/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFI67fs7M8hyUobTrERArlfAJ0TurMdyGK0YR9UK263h8p2ZesqXQCfdQo3 Tn4oDFWJg9JIyTEQOJ2jrCE= =Y/Sy -----END PGP SIGNATURE-----