#32537: RequestSite and IDN
--------------------------------------------+------------------------
               Reporter:  François Poulain  |          Owner:  nobody
                   Type:  Uncategorized     |         Status:  new
              Component:  Uncategorized     |        Version:  3.1
               Severity:  Normal            |       Keywords:
           Triage Stage:  Unreviewed        |      Has patch:  0
    Needs documentation:  0                 |    Needs tests:  0
Patch needs improvement:  0                 |  Easy pickings:  0
                  UI/UX:  0                 |
--------------------------------------------+------------------------
 Without using django.contrib.sites, get_current_site reply a RequestSite
 instance defining name and domain.

 On a IDN setup, we are currently getting Punicode in the name due to the
 init sequence:
 {{{
       def __init__(self, request):
           self.domain = self.name = request.get_host()
 }}}
 IMHO a punicode version of the domain in not what I expect in the
 {{{name}}} attribute.

 I suggest that if the domains starts with {{{xn--}}} it should be tried to
 set the name by decoding the domain from idna.

 How do you think about it? (I may provide patch if you agree on the
 behavior)

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32537>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.d1187fa421b44ef2be87ac5d3bc900b3%40djangoproject.com.

Reply via email to