Skip to content
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

Textproto should handle missing boundary in a better way ? #129

Open
akissa opened this issue Feb 16, 2021 · 0 comments
Open

Textproto should handle missing boundary in a better way ? #129

akissa opened this issue Feb 16, 2021 · 0 comments

Comments

@akissa
Copy link

akissa commented Feb 16, 2021

When dealing with spam you find lots of malformed messages like some missing the final boundary in multipart messages.
In cases like this the parser returns an encapsulated EOF error like so multipart: NextPart: EOF from

return nil, fmt.Errorf("multipart: NextPart: %v", err)

That is hard to detect in the calling code. It would be better to have a named error instead like missing boundary which can be detected in calling code because the message is actually parsed so the error should not fail the whole process

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant