curl-library
Configuration question
Date: Fri, 18 May 2001 18:07:24 +0200
Hello!
First, libcurl is great (and using Mozilla cookies seems to work very well)!
I'm a little bit confused regarding the FAILONERROR option (can't figure it out
from the documentation). I want libcurl to fail on any error above 300 as long
as there is no Location set in the header containing the HTTP code. So my
question is will FAIL_ON_ERROR set to 1 only affect the last response after a
redirect or will it fail immediately? Many servers return a response with code
"302 Moved Temporary" and then a Location where to find the real file. I want
libcurl to follow that location but if it gets for example "404 Not found" from
that location it should fail with an error code.
I want to do like this:
curl_easy_setopt(mCurlHandle, CURLOPT_FAILONERROR, 1);
curl_easy_setopt(mCurlHandle, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(mCurlHandle, CURLOPT_MAXREDIRS, 5);
Will it work? It's hard for me to test it here and even if it would work I want
to hear from someone else that it is a defined behaviour.
Regards,
Johan
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-05-18