urldata: change 'keep_post' into three distinct bitfields

Closes #20262
This commit is contained in:
Daniel Stenberg 2026-01-12 11:07:01 +01:00
parent 31fbbb322e
commit 9e0b02c19c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 11 additions and 8 deletions

View file

@ -963,7 +963,9 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
/* no return error on too high numbers since the bitmask could be
extended in a future */
return CURLE_BAD_FUNCTION_ARGUMENT;
s->keep_post = arg & CURL_REDIR_POST_ALL;
s->post301 = !!(arg & CURL_REDIR_POST_301);
s->post302 = !!(arg & CURL_REDIR_POST_302);
s->post303 = !!(arg & CURL_REDIR_POST_303);
break;
case CURLOPT_HEADEROPT: