#15237: Django generated Atom/RSS feeds don't specify charset=utf8 in their
Content-Type
-----------------------------------------+----------------------------------
               Reporter:  simon          |         Owner:  jasonkotenko
                 Status:  assigned       |     Milestone:  1.3         
              Component:  RSS framework  |       Version:  1.2         
             Resolution:                 |      Keywords:              
           Triage Stage:  Accepted       |     Has patch:  1           
    Needs documentation:  0              |   Needs tests:  0           
Patch needs improvement:  0              |  
-----------------------------------------+----------------------------------
Changes (by jasonkotenko):

 * cc: jasonkotenko (added)
  * has_patch:  0 => 1


Comment:

 Assertion "Atom feeds containing UTF8 characters should be served with a
 Content-Type of "application/atom+xml; charset=utf8"." verified here:
 http://tools.ietf.org/html/rfc2045#section-5.1 (mime-type syntax) and
 here: http://tools.ietf.org/html/rfc3023#section-3.2 (recommendation to
 always set the charset).

 Although it does appear that if the charset is set in the XML declaration,
 i.e. <?xml version="1.0" encoding="utf-8"?> , then the charset in the
 Content-Type is not required, since everything within that XML document is
 ''supposed'' to be treated as UTF8.  However, it is still recommended so
 will proceed.

 Looks like the code in /django/contrib/syndication/views.py does not set
 the mime-type, it only uses it.  It is the util code in
 /django/utils/feedgenerator.py that sets it, as mentioned above.

 Can't find anything in the docs that requires changing due to this small
 change.

 Added regression test to verify the MIME type is still set with encoding
 in the future.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15237#comment:4>
Django <http://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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to