Skip to content

cw-out: recheck callbacks for each call - #23085

Closed
icing wants to merge 1 commit into
curl:masterfrom
icing:cw-out-callbacks-lookups
Closed

icing wants to merge 1 commit into
curl:masterfrom
icing:cw-out-callbacks-lookups

Conversation

@icing

@icing icing commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

A write function is allowed to invoked curl_easy_setopt and change itself. Get the write callback again after each chunk that has been written.

reported-by: Joshua Rogers & His Minions

A write function is allowed to invoked curl_easy_setopt and
change itself. Get the write callback again after each chunk
that has been written.

reported-by: Joshua Rogers & The Super Intelligence

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.

Copilot review overview

🟢 Approval recommended

The implementation is reviewed; only a non-blocking regression-test nit remains.

Review effort: Lite
Findings: None

What changed in this PR

Updates cw-out to recheck write callback configuration after each output chunk, allowing callbacks to modify themselves during execution.

Changes:

  • Refreshes callback, userdata, and write limits between chunks.
  • Stops processing if the callback is removed.
File Summary
lib/​cw-out.c Rechecks write callback state during buffered output processing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@bagder bagder closed this in 8940c14 Sep 24, 2026
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.

3 participants