Skip to content

transfer: enable custom methods again on next transfer - #21037

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/enable-custom
Closed

transfer: enable custom methods again on next transfer#21037
bagder wants to merge 1 commit into
masterfrom
bagder/enable-custom

Conversation

@bagder

@bagder bagder commented Mar 20, 2026

Copy link
Copy Markdown
Member

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 fb13923

Detected by Codex Security

`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 fb13923

Detected by Codex Security
@bagder
bagder marked this pull request as ready for review March 20, 2026 16:30
@bagder
bagder requested a review from Copilot March 20, 2026 16:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a state leak on reused easy handles where data->state.http_ignorecustom could remain set after a redirect in the new follow modes, causing subsequent transfers on the same handle to incorrectly ignore CURLOPT_CUSTOMREQUEST.

Changes:

  • Reset data->state.http_ignorecustom at the start of each transfer in Curl_pretransfer() to ensure custom methods are honored again on the next transfer.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bagder bagder closed this in 1eb9096 Mar 20, 2026
@bagder
bagder deleted the bagder/enable-custom branch March 20, 2026 16:47
dkarpov1970 pushed a commit to dkarpov1970/curl that referenced this pull request Mar 25, 2026
`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 fb13923

Detected by Codex Security

Closes curl#21037
outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
`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 fb13923

Detected by Codex Security

Closes curl#21037
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants