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

Name of attached file as quoted-printable #28

Closed
AntonKedrov opened this issue Jan 13, 2013 · 2 comments
Closed

Name of attached file as quoted-printable #28

AntonKedrov opened this issue Jan 13, 2013 · 2 comments
Assignees

Comments

@AntonKedrov
Copy link

Filename could be encoded as QP, same way as Subject. I think that it should be decoded in BodypartFromMIME().

Example:

------=_NextPart_000_0010_01CDF1AB.47D55F80
Content-Type: text/plain;
    name="=?koi8-r?B?1MXT1C50eHQ=?="
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
    filename="=?koi8-r?B?1MXT1C50eHQ=?="


------=_NextPart_000_0010_01CDF1AB.47D55F80--
@smiley22
Copy link
Owner

Thank you,

may attributes of header fields use quoted-printable encoding? How do different mail clients deal with this? This is addressed in RFC2231, but I'm not sure how widely this has been implemented.

With web browsers at least, this seems to be quite a mess: http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http

@NiKiZe
Copy link
Contributor

NiKiZe commented Nov 24, 2013

I noted this in #55 with suggested DecodeWords fix.
The only issue would be if filename really contains "=?" but that is very unlikely right?

However, The example filename in this case should work fine if accessed with mail.Attachments ?
(since the .NET Attachment class do decoding of filename)

Http is a different beast, and it is not quite the same on mail.

Will revisit, but wanted to note this down while I have it in fresh memory.

smiley22 added a commit that referenced this issue Jan 22, 2014
- test for issue #28: ensure encoded attachment names are decoded.
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

No branches or pull requests

3 participants