-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net/textproto: canonicalMIMEHeaderKey returns a "malformed MIME header line:" for header containing / #68590
Comments
Seeing as the
|
For #53188 we restricted the set of permitted characters in the textproto package to conform to RFC 7230. We aren't going to go back on that. For the specific case of mail messages we added CL 504416 to permit more characters for mail messages, as part of #58862 and #60332. I don't think there is anything to do here. Sorry. |
The docs on textproto state it's intended for use with SMTP. If that's not the case, should those docs be updated to reflect that? |
Change https://go.dev/cl/601555 mentions this issue: |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
Go version
go1.22.5
Output of
go env
in your module/workspace:What did you do?
I tried to get the mime headers passing an email header
What did you see happen?
I got this error:
malformed MIME header line: X-Hdr-a/b
What did you expect to see?
I expect to see this mime header along with the others in the headers object.
The issue happens because the function
validHeaderFieldByte
is missing the/
character in the list of valid oneshttps://datatracker.ietf.org/doc/html/rfc2822#section-3.6.8
The validation was already missing the character in version 1.19, but the
canonicalMIMEHeaderKey
function was not returning the boolean value to indicate as a !ok to thereadMIMEHeader
function.The text was updated successfully, but these errors were encountered: