Re: Disallow newlines in CURLOPT_HTTPHEADER
| From: | Tim Düsterhus | Date: | Mon, 13 Jul 2026 13:27:17 +0000 |
| Subject: | Re: Disallow newlines in CURLOPT_HTTPHEADER | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-131882@lists.php.net to get a copy of this message | ||
Hi
On 2026-07-13 13:00, Sjoerd Langkemper wrote:
I asked Daniel Stenberg about whether newlines are allowed in headers, and he said:Thank you. Did you ask in any publicly logged location (i.e. not IRC) so that you can provide a link for reference? Though I'm also seeing https://github.com/curl/curl/pull/22309, which I think concludes the question. Best regards Tim DüsterhusThe documentation says in clear terms: The headers included in the linked list must not be CRLF-terminated I believe libcurl might change its treatment of them in a future and start returning error earlier when such octets are found.