Skip to content

Conversation

@karlseguin
Copy link
Collaborator

The callback which was called on a per-header basis is removed. Only XHR was using this, and it was created before the HeaderIterator existed (because I didn't know we could iterate through the response headers in curl after the fact).

The header_done_callback remains, but is now called header_callback (a bit confusing in the short term).

The only difficulty was with fulfilled requests, which do not have an easy handle for our HeaderIterator. The existing code would segfault if transfer.responseHeaderIterator() was called on a fulfilled requests. The HeaderIterator is now a tagged union that abstracts whether the source of the response header is a curl easy, or just an injected list from the fulfilled requests.

The callback which was called on a per-header basis is removed. Only XHR was
using this, and it was created before the HeaderIterator existed (because I
didn't know we could iterate through the response headers in curl after the fact).

The header_done_callback remains, but is now called header_callback (a bit
confusing in the short term).

The only difficulty was with fulfilled requests, which do not have an easy
handle for our HeaderIterator. The existing code would segfault if
transfer.responseHeaderIterator() was called on a fulfilled requests.
The HeaderIterator is now a tagged union that abstracts whether the source of
the response header is a curl easy, or just an injected list from the fulfilled
requests.
@krichprollsch krichprollsch merged commit ff8a847 into main Aug 20, 2025
10 checks passed
@krichprollsch krichprollsch deleted the remove_header_callback branch August 20, 2025 12:35
@github-actions github-actions bot locked and limited conversation to collaborators Aug 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants