make ftp(1) ignore leading whitespace in URLs

2013-11-05 Thread Stefan Sperling
Before: $ ftp ' http://localhost/snap/INSTALL.amd64' ftp: http: no address associated with name ftp: Can't connect or login to host ` http' After: $ ftp ' http://localhost/snap/INSTALL.amd64' Trying ::1... Trying 127.0.0.1... Requesting http://localhost/snap/INSTALL.amd64 100%

Re: make ftp(1) ignore leading whitespace in URLs

2013-11-05 Thread Alexander Hall
On 11/05/13 13:56, Stefan Sperling wrote: Before: $ ftp ' http://localhost/snap/INSTALL.amd64' ftp: http: no address associated with name ftp: Can't connect or login to host ` http' After: $ ftp ' http://localhost/snap/INSTALL.amd64' Trying ::1... Trying 127.0.0.1... Requesting

Re: make ftp(1) ignore leading whitespace in URLs

2013-11-05 Thread Ingo Schwarze
Hi Stefan, Stefan Sperling wrote on Tue, Nov 05, 2013 at 01:56:33PM +0100: Do others think this useful? I hit this because I made copy/paste errors. Useful? I don't know. Maybe, maybe not. But your patch is NOT OK. Try stuff like $ ftp ' foo' bar I would be surprised if you couldn't

Re: make ftp(1) ignore leading whitespace in URLs

2013-11-05 Thread Janne Johansson
I think this would help the port yt to not crash on such urls, and I think it uses ftp to collect the youtube movies. For some reason, I paste starting spaces a lot, and since youtube urls contain and other non-shelly args, I have to paste into a pair of 's, and if there is a space to begin with,

Re: make ftp(1) ignore leading whitespace in URLs

2013-11-05 Thread Stefan Sperling
On Tue, Nov 05, 2013 at 02:08:21PM +0100, Alexander Hall wrote: On 11/05/13 13:56, Stefan Sperling wrote: Before: $ ftp ' http://localhost/snap/INSTALL.amd64' ftp: http: no address associated with name ftp: Can't connect or login to host ` http' After: $ ftp '

Re: make ftp(1) ignore leading whitespace in URLs

2013-11-05 Thread Stefan Sperling
On Tue, Nov 05, 2013 at 02:18:08PM +0100, Ingo Schwarze wrote: Hi Stefan, Stefan Sperling wrote on Tue, Nov 05, 2013 at 01:56:33PM +0100: Do others think this useful? I hit this because I made copy/paste errors. Useful? I don't know. Maybe, maybe not. But your patch is NOT OK.

Re: make ftp(1) ignore leading whitespace in URLs

2013-11-05 Thread Stuart Henderson
fwiw, neither curl nor wget does this.

Re: make ftp(1) ignore leading whitespace in URLs

2013-11-05 Thread Alexander Hall
On 11/05/13 14:44, Stefan Sperling wrote: On Tue, Nov 05, 2013 at 02:08:21PM +0100, Alexander Hall wrote: On 11/05/13 13:56, Stefan Sperling wrote: Before: $ ftp ' http://localhost/snap/INSTALL.amd64' ftp: http: no address associated with name ftp: Can't connect or login to host ` http'

Re: make ftp(1) ignore leading whitespace in URLs

2013-11-05 Thread Otto Moerbeek
On Tue, Nov 05, 2013 at 08:54:00PM +0100, Marc Espie wrote: On Tue, Nov 05, 2013 at 02:20:00PM +0100, Janne Johansson wrote: I think this would help the port yt to not crash on such urls, and I think it uses ftp to collect the youtube movies. Fix yt, then. I hate this. Like others say,

Re: make ftp(1) ignore leading whitespace in URLs

2013-11-05 Thread Theo de Raadt
On Tue, Nov 05, 2013 at 08:54:00PM +0100, Marc Espie wrote: On Tue, Nov 05, 2013 at 02:20:00PM +0100, Janne Johansson wrote: I think this would help the port yt to not crash on such urls, and I think it uses ftp to collect the youtube movies. Fix yt, then. I hate this. Like