transfer: enable custom methods again on next transfer

`http_ignorecustom` is set on redirect handling but was not reset
between transfers, so once a redirect occurs in the new follow modes,
custom request methods were ignored for later transfers on the same
handle.

Follow-up to fb13923dd6

Detected by Codex Security

Closes #21037
This commit is contained in:
Daniel Stenberg 2026-03-20 17:28:03 +01:00
parent f2ba8f0613
commit 1eb9096897
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -490,6 +490,7 @@ CURLcode Curl_pretransfer(struct Curl_easy *data)
data->state.requests = 0;
data->state.followlocation = 0; /* reset the location-follow counter */
data->state.this_is_a_follow = FALSE; /* reset this */
data->state.http_ignorecustom = FALSE; /* use custom HTTP method */
data->state.errorbuf = FALSE; /* no error has occurred */
#ifndef CURL_DISABLE_HTTP
Curl_http_neg_init(data, &data->state.http_neg);