curl-library
http proxies and ftp passwords
From: Michal Marek <mmarek_at_suse.cz>
Date: Mon, 08 Jun 2009 12:02:34 +0200
Received on 2009-06-08
Date: Mon, 08 Jun 2009 12:02:34 +0200
Hi,
$ curl -v -u luser:pokus ftp://localhost/file
does
> USER luser
> PASS pokus
and works fine.
$ curl -v -x localhost:3128 -u luser:pokus ftp://localhost/file
does
> GET ftp://localhost/file HTTP/1.1
> Authorization: Basic bHVzZXI6cG9rdXM=
and fails at least with squid, because the proxy ignores Authorization:
for ftp.
$ curl -v -x localhost:3128 ftp://luser:pokus@localhost/file
does
> GET ftp://luser:pokus@localhost/file HTTP/1.1
and works fine.
Maybe this is a squid bug, but I didn't find anything relevant in the
RFCs. The question is: does it make sense for libcurl to insert the
username:password into the url when doing ftp via a proxy? Attached is
an incomplete patch doing this.
Michal
- text/x-patch attachment: proxy-ftp-passwd.patch