#27007: Handle non-UTF-8 bytes objects for text/* attachments
-------------------------------------+-------------------------------------
     Reporter:  Feuermurmel          |                    Owner:  nobody
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Core (Mail)          |                  Version:  master
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"72d541b61cd7b0a14f70242e2207fdb3f600c4d5" 72d541b]:
 {{{
 #!CommitTicketReference repository=""
 revision="72d541b61cd7b0a14f70242e2207fdb3f600c4d5"
 Fixed #27007 -- Handled non-UTF-8 bytes objects for text/* attachments.

 The fallback logic which allows non-UTF-8 encoded files to be passed to
 attach_file() even when a `text/*` mime type has been specified is
 moved to attach(). Both functions now fall back to a content type of
 `application/octet-stream`.

 A side effect is that a file's content is decoded in memory instead of
 opening it in text mode and reading it into a string.

 Some mimetype-related logic in _create_attachment() has become
 obsolete as the code moved from attach_file() to attach() already
 handles this.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27007#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.2d8268bfba9e2d05c0461f28c4de66ce%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to