icaine / php-mime-mail-parser

Automatically exported from code.google.com/p/php-mime-mail-parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Attachments are always assumed to be base64 encoded

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?
1. parse an email with a plain text attachment (like a CSV file, see
example email)
2. get the attachment stream, and echo it out. You get a lot of garbage.

What is the expected output? What do you see instead?
I'd expect the attachment not base64 decoded if the
content-transfer-encoding is not base64. What I see however is the result
of base64_decode'ing a plain text attachment : gookely gook (otherwise
known as garbage).

What version of the product are you using? On what operating system?
Checked out the trunk (revision 12).

To fix it :

Attached is the SVN diff of my changes...
And the email I was working with (modified to not contain sensitive data)
that highlighted this issue.

Note : 
I've only used the MimeMailParser by using the STDIN stream. So there is a
line which I commented because I'm not sure it was the right thing to do.

Original issue reported on code.google.com by datafusi...@gmail.com on 8 Oct 2009 at 6:08

Attachments:

[deleted comment]
Damn...
Incorrectly getting the header data...
Here we go again.

3rd time lucky?

Original comment by datafusi...@gmail.com on 8 Oct 2009 at 7:10

Attachments:

Thanks for the patch. I committed it to trunk. 

Original comment by buca...@gmail.com on 8 Oct 2009 at 8:40

  • Changed state: Fixed