cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

RE: retreive partial transfer after timeout

From: <theexperts_at_allprodirect.com>
Date: Thu, 12 Dec 2002 14:43:33 -0500

On Wed, 11 Dec 2002 theexperts_at_allprodirect.com wrote:

> curlopt_timeout causes curl to abort without returning any data. However,
> there are times when it would be useful to retrieve any data transferred.
> In fact, sometimes all the useful data has been transferred before the
> timeout, but some useless data causes a timeout and no data gets returned.
> I have been unable to find the solution to this on the web. Is it
possible?
> Perhaps a new option is required such as curlop_partialtransfer? Or am I
> missing something?

libcurl itself delivers data to the glue code whenever it is available, so
it
really is up to the PHP/CURL module to decide what to do with the data when
it "bails out" due to a timeout (or whatever really). I guess it currently
throws it out the window if an error code is returned from libcurl.

It would be really easy to add such a modification to the code that let's
you
keep what has been received even if a timeout occurs.

--
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
============================================================================
==
Daniel-
Thanks for the response.
So if I understand correctly: someone would modify how the PHP/CURL module
handles errors, this would be a new version of CURL, or a patch, and would
have to be installed on the server? (In my case, I would have to convince my
web host to install it.)
I am wondering if writing to a file (i.e. curlopt_file) behaves differently,
capturing any partial transfer. If so, I could change my php program to
handle it that way.
-J.
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
Received on 2002-12-12