cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: Curl command line producing some 0 byte file output (http)

From: Thompson, Blake <Blake.Thompson_at_FMR.COM>
Date: Fri, 19 Dec 2003 13:36:40 -0500

To close out.

Daniel, Thank you for your help and suggestions.

I did not attempt to use the -o flag as I want to be aware of any files that
fail in producing output, thank you for the suggestion though.

Also, I was not aware of the -trace option. I will consider using that as a
first line of defense in the future, before bugging you.

What I found was that when the system ran the scrit as a crontab (at 1:30 in
the morning), it seems to work nearly flawlessly (ok, flawlessly, but I like
to allow myself some lattitude in case I'm wrong). Since there is no
network implications to my script (curls pages from local sources) or the
functions that it performs, I took a look at what else was happening at the
same time as the script ran. I usually was in Windows Explorer in the
folder the files would have been created in, hitting F5 (refresh)
continuously to see what files were being created (or not created).
Evidently, this task was taxing my 2.4 GHz / 1 GB RAM machine too much (did
I mention it was running WinXP?) and thus creating 0 byte files.

Not sure if this is the "solution", but it is what I have found so far. I
consider the issue closed.

Blake Thompson
Technical Team Lead,
Fidelity Web Services
Raleigh, NC

PH: 919.784.0924
EMAIL: blake.thompson_at_fmr.com
AOL IM: FescoBlaketh

"Trust, but verify." - Russian Proverb

>-----Original Message-----
>From: Daniel Stenberg [mailto:daniel-curl_at_haxx.se]
>Sent: Thursday, December 18, 2003 3:07 AM
>To: Curl Mailinglist
>Subject: RE: Curl command line producing some 0 byte file output (http)
>
>
>On Wed, 17 Dec 2003, Thompson, Blake wrote:
>
>> curl
>>
>"http://localhost/sbygad61backup/totalrew.nsf/Printable+Order?O
penView&Expan
> dView&Count=2000" -S > career-forsearch.txt

May I suggest that you use -o instead of redirecting with > ? If you do
that,
curl won't produce any file at all in case of failure. You should also
consider storing/outputting the error code from the curl command, if not for
your own sake, at least for debugging this problem.

I suspect that curl has failed here, and the zero byte file is because it
never performed any transfer.

Another, more data-generating thing to do to track this down would be to add
--trace [file] to each command line, as then we could analyze the trace
files
afterwards for the transfers that failed.

-- 
    Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/
   [[ Do not send mails to this email address. They won't reach me. ]]
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2003-12-19