Skip to content

CURLOPT_HEADERFUNCTION provides unfolded headers #22296

Description

@rfm

I did this

Using the Debian package of the latest release (libcurl4-gnutls-dev/unstable,now 8.21.0-2 amd64) I find that the callback function is given unfolded versions of the folded headers sent in the response from the web server.
This is in contradiction to the documentation (and the behavior at least in version 8.5) where the parts of folded headers are provided to the callback function separately.

I think the change could be viewed as an improvement and may be intentional, but if so the documentation needs to be corrected to reflect the current state of affairs and say which version introduced the change.

I expected the following

Folded header lines to be provided to the callback function as documented: a separate callback for each part of the header, with subsequent parts starting with space or tab.

curl/libcurl version

8.21.0

operating system

Debian amd64

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions