cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

FW: cURL problem with ascii download from tandem

From: <Nico.Baggus_at_mail.ing.nl>
Date: Fri, 23 Jun 2000 13:40:08 +0100

This is an expansion from the previous question
(that was posted from my home address, where i didn't
have all the information available) and a private mail
with Daniel Stenberg.

On his request I posted it to the group...)

Original post:

A transfer with a tandem system consistently fails:
Without the -B it works, but it is an ASCII file and
and the tandem has a rich filesystem (ascii files are not
a stream of bytes with linefeed inserted).

Binary download

curl -u fss.ftpcoins:test!! ftp://tandem.xtra.nl/$DATA.PCEOE.PCG0049 -o t.txt
  % Total % Received % Xferd Average Speed Time Curr.
                                 Dload Upload Total Current Left Speed
100 69632 100 69632 0 0 34420 0 0:00:02 0:00:02 0:00:00 65252

(but the file is useless)

Ascii download:

curl -u fss.ftpcoins:test!! ftp://tandem.xtra.nl/$DATA.PCEOE.PCG0049 -o t.txt -B
  % Total % Received % Xferd Average Speed Time Curr.
                                 Dload Upload Total Current Left Speed
  6 69632 6 4380 0 0 2231 0 0:00:31 0:00:01 0:00:30 0cu
rl: (18) Received only partial file

another one with -v to show you intermediate results:

curl -u fss.ftpcoins:test!! ftp://tandem.xtra.nl/$DATA.PCEOE.PCG0049 -o t.txt -B
-v
* Connected to tandem.xtra.nl (10.75.1.130)
< 220 FTP SERVER T9552D40 (Version 3.f TANDEM 21MAY99) ready.
> USER fss.ftpcoins
< 331 Password required for FSS.FTPCOINS.
> PASS test!!
< 230 User FSS.FTPCOINS logged in. GUARDIAN API enabled
* We have successfully logged in
> PASV
< 227 Entering Passive Mode (10,75,1,130,9,32)
* Connecting to tandem.xtra.nl (10.75.1.130) port 2336
> TYPE A
< 200 Type set to A.
> RETR $DATA.PCEOE.PCG0049
< 150 Opening data connection for \EXTRA.$DATA.PCEOE.PCG0049 (10.75.3.235,4636d)
 (69632 bytes).
* Getting file with size: 69632
  % Total % Received % Xferd Average Speed Time Curr.
                                 Dload Upload Total Current Left Speed
  6 69632 6 4380 0 0 1401 0 0:00:49 0:00:03 0:00:46 0cu
rl: (18) Received only partial file

just ftp from NT does work:

ftp
ftp> open tandem
Connected to tandem.xtra.nl.
220 FTP SERVER T9552D40 (Version 3.f TANDEM 21MAY99) ready.
User (tandem.xtra.nl:(none)): fss.ftpcoins
Password:
230 User FSS.FTPCOINS logged in. GUARDIAN API enabled
ftp> ascii
200 Type set to A.
ftp> get $DATA.PCEOE.PCG0049 t.txt
200 PORT command successful.
150 Opening data connection for $DATA.PCEOE.PCG0049 (10.75.3.235,4623d) (69632 b
ytes).
226 Transfer complete.
65450 bytes received in 0,29 seconds (224,91 Kbytes/sec)
ftp> pwd
257 "\EXTRA.$SYSTEM.NOSUBVOL" is current default.
ftp> cd $DATA
250 CWD command successful.
ftp> pwd
257 "\EXTRA.$DATA.NOSUBVOL" is current default.
ftp> cd pceoe
250 CWD command successful.
ftp> pwd
257 "\EXTRA.$DATA.PCEOE" is current default.
ftp> ls
200 PORT command successful.
150 Opening data connection for \EXTRA.$DATA.PCEOE. (10.75.3.235,4643d) (0 bytes
).
CLGB0620
CMGB0620
DIVI0620
FS000407
PCCLGB05
PCCRC05
PCG0018

----8<------- Cut some names here

ftp> quit
221 Goodbye.

The answer:

[snip]

> 150 Opening data connection for $DATA.PCEOE.PCG0049 (10.75.3.235,4623d) (69632
b
> ytes).
> 226 Transfer complete.
> 65450 bytes received in 0,29 seconds (224,91 Kbytes/sec)

The initially mentioned 69632 bytes is the tandem ascii format then and the
65450 bytes is in NT format?

It would also be interesting to see what the commands the NT client issues,
as can be seen if you enter 'debug' in the client before you do open.

<end of conversation>

Yep the file is complete the size difference is probably because of the
file structure information within the file which is not present on
unix/Windows system. There a file is just a bunch of unstructured bytes.
Tandem and VMS (and others that have record structured files) store record
lengths,
index data for index sequential files etc within the file.

upon request of daniel I added the debug output of a succesfull transfer
(Windows NT
native ftp client) below.

C:\WINNT\Profiles\nico baggus\Desktop\cURL-ssl>ftp
ftp> debug
Debugging On.
ftp> open tandem
Connected to tandem.xtra.nl.
220 FTP SERVER T9552D40 (Version 3.f TANDEM 21MAY99) ready.
User (tandem.xtra.nl:(none)): fss.ftpcoins
---> USER fss.ftpcoins
331 Password required for FSS.FTPCOINS.
Password:
---> PASS test!!
230 User FSS.FTPCOINS logged in. GUARDIAN API enabled
ftp> ascii
---> TYPE A
200 Type set to A.
ftp> get $DATA.PCEOE.PCG0049 t.txt
---> PORT 10,75,3,235,5,23
200 PORT command successful.
---> RETR $DATA.PCEOE.PCG0049
150 Opening data connection for $DATA.PCEOE.PCG0049 (10.75.3.235,1303d) (69632 b
ytes).
226 Transfer complete.
67065 bytes received in 0,96 seconds (69,71 Kbytes/sec)
ftp> quit
---> QUIT
221 Goodbye.

And a session without pasv

curl -u fss.ftpcoins:test!! ftp://tandem.xtra.nl/$DATA.PCEOE.PCG0049 -o t.txt -B
-v -P -
* Connected to tandem.xtra.nl (10.75.1.130)
< 220 FTP SERVER T9552D40 (Version 3.f TANDEM 21MAY99) ready.
> USER fss.ftpcoins
< 331 Password required for FSS.FTPCOINS.
> PASS test!!
< 230 User FSS.FTPCOINS logged in. GUARDIAN API enabled
* We have successfully logged in
* We connect from ci000291
> PORT 10,75,3,235,5,35
< 200 PORT command successful.
> TYPE A
< 200 Type set to A.
> RETR $DATA.PCEOE.PCG0049
< 150 Opening data connection for $DATA.PCEOE.PCG0049 (10.75.3.235,1315d) (69632
 bytes).
* Connection accepted from server
* Getting file with size: 69632
  % Total % Received % Xferd Average Speed Time Curr.
                                 Dload Upload Total Current Left Speed
  6 69632 6 4380 0 0 2024 0 0:00:34 0:00:02 0:00:32 0cu
rl: (18) Received only partial file

I hope someone can help me with this,

regards
Nico Baggus

PLEASE NOTE:
The information contained in this electronic mail message is
privileged and confidential, and is intended only for use of the
addressee. If you are not the intended recipient, you are hereby
notified that any disclosure, reproduction, distribution or other
use of this communication is strictly prohibited.
If you have received this communication in error, please notify
the sender by reply transmission and delete the message without
copying or disclosing it.
Received on 2000-06-23

These mail archives are generated by hypermail.

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

File upload with ASP.NET