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

EOF reached before we reached the end of the headers #358

Closed
jangpa01 opened this issue Nov 20, 2017 · 8 comments
Closed

EOF reached before we reached the end of the headers #358

jangpa01 opened this issue Nov 20, 2017 · 8 comments
Labels
bug Something isn't working

Comments

@jangpa01
Copy link

A message with a very long header not properly folded :
800 chars + (0x0d0x0a not followed by space) + 164 chars
Mimeparser.cs ReadAhead:881 returns Available = Left and so detects EOF.
Incermenting ReadAheadSize from 128 to 200 'solved' the problem.
Apparently it depends on the position in the stream of this malformed header because different messages
with the same malformed header decode without problems.
thanks

@12454j
Copy link

12454j commented Nov 20, 2017

Thank you

@jstedfast
Copy link
Owner

Could you attach a sample message (or send me one via email) so that I can debug this as well as adding a unit test?

Thanks!

@jangpa01
Copy link
Author

jangpa01 commented Nov 20, 2017 via email

@jstedfast
Copy link
Owner

A few questions since I don't seem to be able to reproduce:

  1. What version of MimeKit are you using?
  2. Are you running your app on the Microsoft Windows .NET CLR? Or on Mono (on e.g. Linux, Mac)?
  3. Do you know if the message is in DOS or Unix format? (e.g. CRLF vs LF line endings)

@jstedfast
Copy link
Owner

Never mind, I am hitting it.

jstedfast added a commit that referenced this issue Nov 20, 2017
@jstedfast jstedfast added the bug Something isn't working label Nov 20, 2017
@jstedfast
Copy link
Owner

Thanks for reporting this! Also thankful that you took the time to debug this and narrow it down to the cause.

I'll try to make a new release soonish. Working on asyncifying MailKit, but if that isn't finished by this weekend, I'll make a new release of MimeKit/MailKit anyway with the bug fixes that I have.

@jangpa01
Copy link
Author

Thanks so much for the superfast fix :)

@12454j
Copy link

12454j commented Nov 20, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants