id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 24834 Optional port in Host request header breaks get_current_site() Nick Pope Nick Pope When calling `django.contrib.sites.shortcuts.get_current_site()` and relying on `HttpRequest.get_host()` to determine the current site, the query can fail if the Host header contains a port. This bug has been present since 1.5 where `RequestSite` was introduced and also turns up in 1.8 with support for using the request in `SiteManager.get_current()`. Bug closed contrib.sites 1.5 Normal fixed Ready for checkin 1 0 0 0 0 0