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/mail: ReadMessage returns EOF error when the body is not present #47886
Comments
According to RFC1341 Section 7.2:
So I believe the code is fine. It should be the message which doesn't follow RFC 822. |
I guess the message is valid. According to RFC 822
And there is an example here. So it might be |
We may need some extra check here. To return messages with no body present. |
Moving this issue to #47897 |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
What did you see instead?
Reason
According to RFC2822 Section 2.1:
This is a valid(is it?):message/*
without a bodyWhich I believe 'mime/multipart' should return this:
But it omits the last
\n
which makes the message invalid due to the missing blank line after headers.Refrence
I think we should fix this here.
The text was updated successfully, but these errors were encountered: