Aborting downloads based on headers?
Date: Fri, 20 May 2005 18:34:35 -0400
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