cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Canİöt get thru proxy?

From: Ivansson Gunno <Gunno.Ivansson_at_msb.se>
Date: Thu, 18 Feb 2010 15:09:13 +0100

On 2010-02-18 14.03, "Daniel Stenberg" <daniel_at_haxx.se> wrote:

> On Thu, 18 Feb 2010, Ivansson Gunno wrote:
>
>> Our IT-department have set up a new proxy and since then I can?t upload
>> files with curl. My command looks like this: curl --proxy
>> xxx-xx-xx.xxx.local:8021 -T
>> "{/Users/gunno/Documents/Tidningen_local/Skicka_VTAB/TJUG-0217-A-018-A.pdf}"
>> -u myUser:myPassword ftp://ftp1.x-xxx.se/
>
> That's a FTP upload over an HTTP proxy. That's off the map. It's a no man's
> land. Where things migth or might not work.
>
> There's no defined stadard for how that is supposed to work, so it varies
> between different proxies and I also figure that various proxies can change
> their behaviors on demand as well.
>
>> curl --proxy xxx-xx-xx.xxx.local:8021 -u myUser ftp:// ftp1.x-xxx.se/ -v
>
> That's a plain fetch though, which should be easier.
>
>>> GET ftp:// ftp1.x-xxx.se/ HTTP/1.1
>
> Note that you also inlcuded your password there.
>
>> 220 IronPort WSA ready.
>> 500 Syntax error, command unrecognized.
>
> That's really weird output, but I don't see what curl can do differently in
> this case. It asks the proxy for the URL and the proxy hands back crap.
>
>> I have very little command line experience and have composed my command from
>> examples. Our IT-deparment told me to use Filezilla, which manage to get
>> thru our proxy, but this command is part of a larger script that create PDFs
>> and send them to a print shop. Ana idea why this doesn?t work?
>
> I don't know Filezilla, but can it be that is uses CONNECT through the proxy
> (curl's -p option)? Or perhaps even that they compared with a different
> protocol as I believe Filezilla might also work with SFTP etc?
>
> --
>
> / daniel.haxx.se

Daniel, thanks for the answer. My admin people says port 8021 is a ftp proxy
port. It is a Cisco proxy and after installing a fix they assumed my script
would work:
"Fixed: FTP clients do not work with FTP servers that support MLSD
Previously, FTP clients did not work with FTP servers that support MLSD.
This was due to the FTP Proxy claiming the FTP server supported MLSD even
though the FTP Proxy did not support MLSD. Clients would try to use MLSD,
but the transaction failed. This no longer occurs. Now, the FTP Proxy no
longer claims that the FTP server supports MLSD, so FTP clients no longer
try to use it. [Defect ID: 52216]"

Obviously this did not help me. Maybe an output from a successful connection
with FileZilla can shed some light on what is going on:

14:27:20??Status:?? Using proxy xxxxxxxxxx.local:8021
14:27:20??Status:?? Resolving address of xxxxxxxxxx.local
14:27:20??Status:?? Connecting to 192.xxx.x.xx:8021ĦĤ
14:27:20??Status:?? Connection established, waiting for welcome message...
14:27:20??Response:?20 IronPort WSA ready.
14:27:20??Command:??USER xxxxx_at_ftp1.xxxx.se
14:27:20??Response:?331 User name okay, need password.
14:27:20??Command:??PASS *****
14:27:21??Response:?230 User logged in, proceed.
14:27:21??Command:??SYST
14:27:21??Response:?215 UNIX Type: L8
14:27:21??Command:??FEAT
14:27:21??Response:?211-Extensions supported:
14:27:21??Response:?SIZE
14:27:21??Response:?MDTM
14:27:21??Response:?211 End
14:27:21??Status:???Connected
14:27:21??Status:???Retrieving directory listing...
14:27:21??Command:??PWD
14:27:21??Response:?257 "/" is current directory.
14:27:21??Command:??TYPE I
14:27:21??Response:?200 Type set to I.
14:27:21??Command:??PASV
14:27:21??Response:?227 Entering Passive Mode (192.xxx.x.xx,xx,xxx).
14:27:21??Command:??LIST
14:27:21??Response:?150 Opening ASCII mode data connection for /bin/ls.
14:27:21??Response:?226 Closing data connection.
14:27:21??Status:???Directory listing successful

--
Gunno I



MSB har ny webbadress: www.msb.se

MSB has a new web address: www.msb.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-02-18