cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-560965 ] FTP transfert in acsii

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 27 Dec 2005 12:41:35 -0800

Bugs item #560965, was opened at 2002-05-27 00:38
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=560965&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: ftp
Group: bad behaviour
Status: Closed
Resolution: Invalid
Priority: 6
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: FTP transfert in acsii

Initial Comment:

The ftp transfert in ASCII mode fails ( the transfert is
already in binary :( ).

I was working to get a MVS file ( transfert protocol have
to be in ascii mode ).
I use de version 7.9.6 of curl on Win32 ( windows NT 4.0
sp6a ) and the same proble appear with libcurl for PHP.

Thank you.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2005-12-27 12:41

Message:
Logged In: NO

DarkFire

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2002-06-05 07:08

Message:
Logged In: YES
user_id=1110

Closing this. This is arguably perhaps a bug in that is
doesn't tell the user about this situation.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2002-06-04 05:24

Message:
Logged In: YES
user_id=1110

Aha!

This explains a lot. Unfortunately, when using a HTTP proxy
for doing FTP transfers, such as the one you do when this
fails, the protocol doesn't allow all the controls one
otherwise have when doing FTP transfers.

This is an example of such a shortcoming. You just can't
make ASCII FTP transfers when going over a http proxy.

Sorry. This is a protocol problem, not implementation.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2002-06-04 05:15

Message:
Logged In: NO

Ok.

When i do :

C:\curl -v -i -# -B -U proxyuser:pass -x 10.115.132.102:8080
ftp://ftpuser:pass@x.x.x.x/'name_of_file_in_mvs' &gt; file1
* About to connect() to 10.115.132.102:8080
* Connected to 10.115.132.102 (10.115.132.102) port 8080
&gt; GET ftp://xxx:xxx@x.x.x.x/'name_of_file_in_mvs'
HTTP/1.1
Proxy-authorization: Basic YWRtaW46TmV0Q2FjaGU=
Authorization: Basic dDMwMjQ6dHJhbnNmYWM=
User-Agent: curl/7.9.6 (win32) libcurl 7.9.6
Host: x.x.x.x:21
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg,
image/pjpeg, */*
##########* Closing connection #0

---&gt; here the file1 is wrong like it was transfert in binary mode
---&gt; the problem is the same with the php library

But I have make another test :

C:\curl&gt;curl -v -i -B -#
ftp://ftpuser:pass@x.x.x.x/'name_of_file_in_mvs' &gt; file2
* About to connect() to ftpuser:pass_at_x.x.x.x:21
* Connected to x.x.x.x (x.x.x.x) port 21
&lt; 220-FTPDA1 IBM FTP CS V2R6 at xxxxx, 12:05:28 on
2002-06-04.
&lt; 220 Connection will close if idle for more than 5 minutes.
&gt; USER xxx
&lt; 331 Send password please.
&gt; PASS xxx
&lt; 230 xxx is logged on. Working directory is &quot;xxx.&quot;.
* We have successfully logged in
&gt; PWD
&lt; 257 &quot;'xxx.'&quot; is working directory.
* Entry path is 'xxx.''
&gt; EPSV
&lt; 500 unknown command EPSV
&gt; PASV
&lt; 227 Entering Passive Mode (x.x.x.x,15,212)
* About to connect() to xxx.xxx_at_x.x.x.x:4052
* Connecting to x.x.x.x (x.x.x.x) port 4052
* Connected the data stream with PASV!
&gt; TYPE A
&lt; 200 Representation type is Ascii NonPrint
&gt; SIZE 'name_of_file_in_mvs'
&lt; 502 command SIZE not implemented
&gt; RETR 'name_of_file_in_mvs'
&lt; 125 Sending data set name_of_file_in_mvs FIXrecfm 1725
* Getting file with size: -1
##&lt; 250 Transfer completed successfully.
##* Connection #0 left intact
* Closing connection #0

---&gt; here the file2 is right it was transfert in ascii mode

I hope it will help you.
( sorry for my bad english ;)

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2002-06-03 05:01

Message:
Logged In: YES
user_id=1110

OK, I still need more details to get a clue.

Can you please run the curl command with -v and -i and
display what it'll show you? Edit out sensitive before you
post. Just saying &quot;it doesn't work&quot; doesn't really help me
to understand what goes wrong.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2002-06-03 04:56

Message:
Logged In: NO

No upload, i'm speaking about FTP download.

And i could not give you the url because it's a special
machine whose's acces is restricted.

If i use the windows FTP in ascii mode, than it works.
But with curl in binary or ascci mode the result is the same
as windows FTP in binary -&gt; the file is not good

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2002-05-27 01:09

Message:
Logged In: YES
user_id=1110

Are you talking about a FTP upload here? Because if that is
the case, then yes, this is a missing funcionality that is
also mentioned in the TODO-file that we want to have fixed
one day. Feel free to submit patches that offer this!

If you're talking about FTP dowload here, can you please be
more specific and also if possible provide a working URL
with protocol dump that illustrates the problem?

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=560965&group_id=976
Received on 2005-12-27

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET