#23716: Reverse url doesn't container port-number
-------------------------------+--------------------
     Reporter:  xeor           |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Core (URLs)    |    Version:  1.7
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 When developing sites, you are often ending up with using something that
 is not port 80 or 443 to test your site.
 Looks like this breaks the stuff like from
 django.core.urlresolvers.reverse.
 Digging into the problem, I found that the problem was around
 https://github.com/django/django/blob/1.7/django/http/request.py#L129

 The solution is fairly simple by changing the current_uri line to eg:
 """
 current_uri = '%s://%s%s%s' % (self.scheme,
                                          self.get_host(), ':%s' %
 (self.META['SERVER_PORT'] if self.META['SERVER_PORT'] not in ['80', '443']
 else ''), self.path)
 """

 However, I have the feeling that this would have been fixed a long time
 ago, and is probably left out by design. Or?

--
Ticket URL: <https://code.djangoproject.com/ticket/23716>
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/047.0cf6b0cba98072ded19bb9d8d8820e20%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to