Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
The library breaks the scenario if HTTP headers uses the CRLF characters in the header. It is common in MIME transfer
"Content-Type": "multipart/report;\r\n\treport-type="disposition-notification";\r\n\tboundary="d9f60885-8cd2-4516-bc47-858c3c14d2aa""
The above content type is valid as per RFC
We addressed \t characters in the following PR but not other control characters US-ASCII (10 and 13)
#40633
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
No response
Anything else?
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
MihaZupan commentedon Apr 14, 2025
Notably such values in headers aren't interpreted as new lines, but as regular spaces, so a workaround of replacing these characters with spaces is valid.
As far as actually sending such characters over the wire, note that RFC 2616 was superseded by RFC 7230 (2014), which was in turn superseeded by RFC 9112.
Both call the feature "obsolete" and warn against using it:
praveensri commentedon Apr 14, 2025