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

curl-and-php

Re: retreive partial transfer after timeout

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 12 Dec 2002 13:08:15 +0100 (MET)

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.
-------------------------------------------------------
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