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-2793691 ] when no data is given, file output keep old values

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 19 May 2009 09:37:31 +0000

Bugs item #2793691, was opened at 2009-05-19 10:06
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2793691&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: client module
Group: bad behaviour
>Status: Closed
>Resolution: Invalid
>Priority: 5
Private: No
Submitted By: Sebastien WILLEMIJNS (sebone)
Assigned to: Daniel Stenberg (bagder)
Summary: when no data is given, file output keep old values

Initial Comment:
del deleteme
curl http://www.willemijns.com/ -o deleteme
type deleteme
pause

> OK i see data of www.willemijns.com

curl http://dns-will-never-exist.willemijns.com/ -o deleteme
type deleteme
pause

> The file output stays to www.willemijns.com :-( in fact the file "deleteme" is not deleted when they are no output
data to write.... logically the file "deleteme" will never exist (because request is false) and must be empty when request begins ;)

******************************************************************************************

D:\>curl http://www.willemijns.com/ -o deleteme

  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
138 276 0 276 0 0 2936 0 --:--:-- --:--:-- --:--:-- 5872

D:\>type deleteme
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>302 Found</TITLE>
</HEAD><BODY>
<H1>Found</H1>
The document has moved here.<P>
<HR>
<ADDRESS>Apache/1.3.41 Server at www.willemijns.com Port 80</ADDRESS>
</BODY></HTML>

D:\>pause
Appuyez sur une touche pour continuer...

D:\>curl http://dns-will-never-exist.willemijns.com/ -o deleteme

curl: (6) Could not resolve host: dns-will-never-exist.willemijns.com; No data record of requested type

D:\>type deleteme
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>302 Found</TITLE>
</HEAD><BODY>
<H1>Found</H1>
The document has moved here.<P>
<HR>
<ADDRESS>Apache/1.3.41 Server at www.willemijns.com Port 80</ADDRESS>
</BODY></HTML>

D:\>pause
Appuyez sur une touche pour continuer...

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

>Comment By: Daniel Stenberg (bagder)
Date: 2009-05-19 11:37

Message:
First, don't change priority on bugs since that field is for bug tracker
admins.

Then, you're experiencing a feature that we've made an effort to make curl
do. If you prefer not having a file after a failure, delete the file
yourself before asking curl to get it.

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

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2793691&group_id=976
Received on 2009-05-19

These mail archives are generated by hypermail.

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

File upload with ASP.NET