-
Notifications
You must be signed in to change notification settings - Fork 266
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
Content type params utf8 #235
Conversation
Looks ok to me, especially with the added test case. Wondering if the encode_paramater changes are affecting other headers. @seriyps what do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I, honestly, don't remember how exactly this part works. Would be nice to get some comments with explanation from @kape1395. But, since no tests were broken, I think it's ok
I tried to keep the other headers unchanged. As I understand, ContentTypeParams are only used to construct the ContentType and the ContentDisposition headers. Other headers are used as provided by the user, therefore the user is responsible for formatting their values properly. |
@kape1395 could you rebase this on the newest master? |
7448e7d
to
84ecc39
Compare
I have rebased my changes on the master. But this test is failing, maybe because it tries to access external server.
All tests are passing, if this one is removes. And, maybe this one should be added to a list with the previous testcase, because the former is currently ignored. |
So, did I get it correctly that before your change, if one passes UTF-8 encoded binary as, eg, |
Yes, the MIME message was corrupted in the case of some letters in the filename. Two newlines were inserted instead of that letter (not sure was that by SMTP or Gmail client), so the attachment was corrupted and half of the headers were shown as a mail text body. With this change the filenames with UTF8 letters are processed correctly. |
@seriyps Shall we remove that test with |
@kape1395 I am terribly sorry, but could you rebase once again? Ping me when you are done, then I wil merge. |
@kape1395 could you rebase this? Then we can merge. |
looking at it. |
It looks like it will be easier to reimplement my stuff than rebase it.
It replaces space with "_". The proper approach is to replace it with "=20".
then other tests fail, but I think those tests are incorrect (because they expect an underscore instead of space). |
@kape1395 I think it was explained in the PR thatintroduced this change #294 (comment) @Maria-12648430 do you have some more comments about it? |
84ecc39
to
673e7a2
Compare
I updated my changes to work with _ instead of =%20 and all the other changes in the master branch. I hope that looks good. |
@Maria-12648430 is currently not available, but I can answer that: see RFC 2047 Section 4.2 (2). Though it says some mail gateways may not understand the underscore, I never saw any problems with that (I work in the E-Mail business), which is not surprising given the RFC dates back to 1996. |
Thanks @kape1395 ! |
No description provided.