mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:23:39 +03:00
lib: add CURLFOLLOW_OBEYCODE and CURLFOLLOW_FIRSTONLY
With this change, the argument passed to the CURLOPT_FOLLOWLOCATION option is now instead a "mode" instead of just a boolean. Documentation is extended to describe the two new modes. Test 1571 to 1581 verify. Closes #16473
This commit is contained in:
parent
294136b754
commit
fb13923dd6
23 changed files with 1328 additions and 34 deletions
|
|
@ -525,7 +525,9 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
|
|||
/*
|
||||
* Follow Location: header hints on an HTTP-server.
|
||||
*/
|
||||
data->set.http_follow_location = enabled;
|
||||
if(uarg > 3)
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
data->set.http_follow_mode = (unsigned char)uarg;
|
||||
break;
|
||||
|
||||
case CURLOPT_UNRESTRICTED_AUTH:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue