cURL / Mailing Lists / curl-library / Single Mail

curl-library

libcurl and Microsoft IIS FTP server

From: Jeff Vincent <Jeff_Vincent_at_symantec.com>
Date: Mon, 29 Oct 2007 08:45:26 -0700

I'm new to this list and have tried searching the archives for my issue
but without success. I am debugging an app (that I didn't write) that
uses libcurl for FTP support. When copying against a Windows 2000
Server running the latest service packs (sp4) and using the MS IIS FTP
server I am getting some weird behavior. I can't find anything to tell
me there is a problem with the MS FTP server or that it behaves
differently than other FTP server implementations.

 

Sometimes the destination file is truncated and sometimes it disappears.
I used WireShark to get a packet trace and it seems that for some
unknown reason, the MS FTP server (or the TCP stack on the FTP server)
sends a RST and closes the connection. Sometimes this happens in
conjunction with the FTP message 426 - Transfer aborted.

 

In both cases, it seems that the FTP server is cleaning up what it
thinks is an incomplete file transfer and deleting the partially copied
file. I don't think this is a configurable option. In one case, cURL
recognizes a partial transfer and attempts to resume the transfer by
starting the copy where it left off and appending to the file (APPE as
seen in the packet trace). Since the server deleted the partial
transfer, the result is a truncated file. cURL then reports success.

 

In the case where the RST happens toward the end of the file transfer,
cURL thinks the file copy is complete and reports success, but the file
is deleted on the server.

 

I have enabled all tracing (which the developer has noted is all or
nothing), but I am unable to see cURL handling the RST or 426 conditions
in the log file so am unable to determine what cURL thinks is happening.

 

Are there known issues with the MS FTP server or does anyone have
suggestions on any options or ways to debug what is happening on either
side that could help?

 

Thanks,

 

Jeff
Received on 2007-10-29