-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Add get_content_disposition() to email.message.Message #65282
Comments
"Content-Disposition is an optional header field. In its absence, the MUA may use whatever presentation method it deems suitable." — RFC 2183 The email.message.Message class should gain a get_content_disposition() method with the three possible return values 'inline', 'attachment', and None so that email clients can easily distinguish between the three states described in the RFC. See also the discussion at http://bugs.python.org/issue21079 |
I read the discussion on issue bpo-21079. Does this issue still needs a patch? If yes I am willing to write one. |
Yes, that would be great. |
I have attached my patch. Reviews? |
Looks pretty good. The docs should say that the value of header is returned, and should also mentioned that the value is lower cased. You should also add a 'versionadded' directive, and for bonus points an entry in the whatsnew document for 3.5. Also, all three possible values should be tested, and a mixed case version of at last one of them, as well as a header that mime parameters in addition to the header value. |
I have updated the patch. The header with mime parameter 'filename' in addition to header value is already added, will that not be enough? |
Looks good, thanks. |
New changeset 29ba76f5c3dc by R David Murray in branch 'default': |
Thanks, Abhilash. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: