#10267: HttpResponse.build_absolute_uri does not encode IRIs properly.
------------------------------------+---------------------------------------
          Reporter:  liangent       |         Owner:  nobody
            Status:  reopened       |     Milestone:        
         Component:  HTTP handling  |       Version:  1.0   
        Resolution:                 |      Keywords:        
             Stage:  Unreviewed     |     Has_patch:  0     
        Needs_docs:  0              |   Needs_tests:  0     
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Changes (by mtredinnick):

  * summary:  HttpResponsePermanentRedirect cannot accept chinese
              characters => HttpResponse.build_absolute_uri
              does not encode IRIs properly.

Comment:

 I'd guess that we should be calling `django.utils.encoding.iri_to_uri` in
 `build_absolute_uri()`. It's the URI constructor's job to encode things
 correctly and, in this case, that would probably be `build_absolute_uri`,
 since we use `request.path`, which is a unicode object.

 As noted by liangent, the problem is not specific to
 `HttpResponsePermanentRedirect`. I'll change the title of the ticket.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10267#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