mirror of
https://github.com/curl/curl.git
synced 2026-07-29 22:28:09 +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
|
|
@ -175,6 +175,16 @@ typedef enum {
|
|||
#define CURLSSLBACKEND_CYASSL CURLSSLBACKEND_WOLFSSL
|
||||
#define CURLSSLBACKEND_DARWINSSL CURLSSLBACKEND_SECURETRANSPORT
|
||||
|
||||
/* bits for the CURLOPT_FOLLOWLOCATION option */
|
||||
#define CURLFOLLOW_ALL 1L /* generic follow redirects */
|
||||
|
||||
/* Do not use the custom method in the follow-up request if the HTTP code
|
||||
instructs so (301, 302, 303). */
|
||||
#define CURLFOLLOW_OBEYCODE 2L
|
||||
|
||||
/* Only use the custom method in the first request, always reset in the next */
|
||||
#define CURLFOLLOW_FIRSTONLY 3L
|
||||
|
||||
struct curl_httppost {
|
||||
struct curl_httppost *next; /* next entry in the list */
|
||||
char *name; /* pointer to allocated name */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue