#24834: Optional port in Host request header breaks get_current_site()
-------------------------------+------------------------------------
     Reporter:  ngnpope        |                    Owner:  ngnpope
         Type:  Bug            |                   Status:  assigned
    Component:  contrib.sites  |                  Version:  1.5
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  1              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  1
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+------------------------------------
Changes (by claudep):

 * needs_better_patch:  0 => 1
 * stage:  Unreviewed => Accepted


Comment:

 I think we should account for the scenario where someone runs several
 sites under different ports (example.org:8081, example.org:8082, etc.) and
 also includes the port in `Site.domain`.
 Possible approaches:
 - try first with `domain:port` and fallback to the version without the
 port
 - strip the port only if it is the default port (80/443)

--
Ticket URL: <https://code.djangoproject.com/ticket/24834#comment:3>
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/065.f7daeceea9b62b84ffe98d410b485935%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to