cURL
Haxx ad
libcurl

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Archives

Extra CWD in curl_easy on Windows

From: Dave Galloway <dgalloway_at_rx30.com>
Date: Fri, 13 Nov 2009 10:15:06 -0500

Hello,

Updated libcurl from 7.12.0 to 7.19.6.
Built libcurl on Linux and Windows XP Pro SP2 (VC++ 6.0).
Linked libcurl to our program.
Basic flow is login, placed in account directory (zzzz), change to out directory (zzzz/out),
download the file, move back to account directory (zzzz), delete the file in the out
directory (DELE out/test.txt). Probably should just delete the file while we are in the out
directory but this code was written many years ago and I am the keeper now and I am trying
not to break anything. Linux version seems to run fine.
Windows version adds a "CWD /" that takes us too high up the directory tree.
No code is changed in our program, just the libcurl version that we link to in VC6,
link to 7.12.0 and it works, link to 7.19.6 and we get the CWD / and a failure.
Logs shown below.

This one works (7.12.0):

< 230 User zzzz logged in.
* We have successfully logged in
> PWD
< 257 "/zzzz" is current directory.
* Entry path is '/zzzz'
* Connection #0 to host xx.xxx.xx.xx left intact
Checking OUT for files
* Re-using existing connection! (#0) with host xx.xxx.xx.xx
* Connected to xx.xxx.xx.xx port 21
> CWD /zzzz
< 250 CWD command successful.
> CWD out
< 250 CWD command successful.

... more stuff

< 226 Transfer complete.
* Connection #0 to host xx.xxx.xx.xx left intact
File test.txt Received
X12COMM: Size 94363.000 Speed: 150980.000 bytes/sec during 0.625 seconds

* Re-using existing connection! (#0) with host xx.xxx.xx.xx
* Connected to xx.xxx.xx.xx port 21
> CWD /zzzz
< 250 CWD command successful.
* Connection #0 to host xx.xxx.xx.xx left intact
Removing test.txt from OUT
* Re-using existing connection! (#0) with host xx.xxx.xx.xx
* Connected to xx.xxx.xx.xx port 21
> DELE out/test.txt <------ Works fine since we are in zzzz
< 250 DELE command successful.
> CWD /zzzz
< 250 CWD command successful.
* Connection #0 to host xx.xxx.xx.xx left intact
> QUIT
< 221
* Closing connection #0

This one fails (7.19.6):

< 220 Microsoft FTP Service
> USER zzzz
< 331 Password required for zzzz.
> PASS aaaaaaa
< 230 User zzzz logged in.
> PWD
< 257 "/zzzz" is current directory.
* Entry path is '/zzzz'
> CWD / <--------------------- This is new
< 250 CWD command successful.
* Remembering we are in dir "/"
* Connection #0 to host xx.xxx.xx.xx left intact
Checking OUT for receive files
* Re-using existing connection! (#0) with host xx.xxx.xx.xx
* Connected to xx.xxx.xx.xx port 21 (#0)
> CWD /zzzz
< 250 CWD command successful.
> CWD out
< 250 CWD command successful.

... more stuff

< 226 Transfer complete.
* Connection #0 to host xx.xxx.xx.xx left intact
File test.txt Received
Size 94363.000 Speed: 183229.000 bytes/sec during 0.515 seconds

* Re-using existing connection! (#0) with host xx.xxx.xx.xx
* Connected to xx.xxx.xx.xx port 21 (#0)
> CWD /zzzz
< 250 CWD command successful.
> CWD / <-------------------- This is new and moves us to root
< 250 CWD command successful.
* Remembering we are in dir "/" <----- Not where we want to be
* Connection #0 to host xx.xxx.xx.xx left intact
Removing test.txt from OUT
* Re-using existing connection! (#0) with host xx.xxx.xx.xx
* Connected to xx.xxx.xx.xx port 21 (#0)
* Request has same path as previous transfer
> DELE out/test.txt <----------- Fails since we are at root, not zzzz
< 550 out/test.txt: The system cannot find the path specified.
* QUOT command failed with 550
* Closing connection #0

Sorry for the message length, just trying to give all the details.
New to libcurl and this mail list.
Thanks for any help.

Dave

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-13

These mail archives are generated by hypermail.

donate! Page updated November 16, 2009.
web site info

File upload with ASP.NET