RE: Aborting downloads based on headers?
Date: Fri, 20 May 2005 20:35:35 -0400
Not to answer my own question, but is the best answer to return -1 from
my header callback?
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Michael
Sent: Friday, May 20, 2005 6:35 PM
To: libcurl development
Subject: Aborting downloads based on headers?
This is probably a stupid question, but here goes. I have a sort of
spider that uses libcurl to download stuff (in a massively multithreaded
way, which works very well, my compliments to you guys), but now I'm in
a situation where I want to reject everything that has a content-type
other than text/html or text/plain
(I'm using the easy interface, btw). I have callback fns for getting the
headers into a vector of strings and getting the content into an stl
Right now, I'm simply calling curl_easy_perform, and then going through
Headers and emptying the content of any item which has the wrong
This is clearly not the way to do this, but I don't see any sensible way
of interrupting the download without hacking into curl itself.
Anyway, I'm sure there is a sensible way to do this. Can anyone suggest
Received on 2005-05-21