#32537: RequestSite and IDN
----------------------------------+--------------------------------------
     Reporter:  François Poulain  |                    Owner:  nobody
         Type:  Uncategorized     |                   Status:  new
    Component:  Uncategorized     |                  Version:  3.1
     Severity:  Normal            |               Resolution:
     Keywords:                    |             Triage Stage:  Unreviewed
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+--------------------------------------
Description changed by François Poulain:

Old description:

> 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)

New description:

 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 any part of 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#comment:1>
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/066.00d9a1c8476bb3d2bcdb4651a7893218%40djangoproject.com.

Reply via email to