cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: cancel a http tranfer after header

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 29 Jul 2008 13:20:36 -0700

On Tue, Jul 29, 2008 at 03:45:32PM -0400, Blue Hawk wrote:
> How do i do this? I return -1 in the header callback? Right now i been

That's right.

> returning -1 in the write callback func.
> CURLOPT_TIMECONDITION looks good. What does lincurl do if the file has not been
> modified since or has? does it ignore/skip the write callback?

It depends. If the server supports time conditions, and the time of the
file is known, and the server has no data to send in the response, then the
write callback will not be called. But in any other case it will. You'll
need to look at the HTTP response code to know the reason, one way or another.

> I still want to know how to exit through the header callback since i may exame
> for specific dates (like anything before or after but not between)

Have you read the documentation?

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-07-29