aboutsummaryrefslogtreecommitdiff
path: root/src/tool_operate.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2012-04-05 23:34:12 +0200
committerDaniel Stenberg <daniel@haxx.se>2012-04-05 23:34:12 +0200
commit29e68b200cd35aaf2bfd0e43ecc2a50efbab674d (patch)
tree66500ab4baa7c8bc400b603a5cef96190a484672 /src/tool_operate.c
parent0b516b7162dc387ed80b0f24476b950ab2e18cb7 (diff)
curl: add --post303 to set the CURL_REDIR_POST_303 option
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r--src/tool_operate.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 04d1589d7..bd0038d4a 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -916,9 +916,12 @@ int operate(struct Configurable *config, int argc, argv_item_t argv[])
if(config->authtype)
my_setopt_flags(curl, CURLOPT_HTTPAUTH, config->authtype);
- /* curl 7.19.1 (the 301 version existed in 7.18.2) */
- my_setopt(curl, CURLOPT_POSTREDIR, config->post301 |
- (config->post302 ? CURL_REDIR_POST_302 : FALSE));
+ /* curl 7.19.1 (the 301 version existed in 7.18.2),
+ 303 was added in 7.26.0 */
+ my_setopt(curl, CURLOPT_POSTREDIR,
+ (config->post301 ? CURL_REDIR_POST_301 : 0) |
+ (config->post302 ? CURL_REDIR_POST_302 : 0) |
+ (config->post303 ? CURL_REDIR_POST_303 : 0));
/* new in libcurl 7.21.6 */
if(config->encoding)