Working with this, i cannot simply use docker host resolution because my
host is invalid:
Invalid HTTP_HOST header: 'my_service:8000'. The domain name provided is
not valid according to RFC 1034/1035.
This is really annoying as Django and any other project should !!never
ever!! force us to check thing that may be irrevelant for the user! Doing
this is the first cause of wasting time and workarounds for simple
problems - !! assuming that code knows better what the human needs is
wrong !!.
Just saying loudly what i think, no offense.
Can we work on this problem?
--
Ticket URL: <https://code.djangoproject.com/ticket/31768>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => invalid
Comment:
[https://en.wikipedia.org/wiki/Hostname#Syntax Underscores are not
permitted in hostnames]. Remove the `_`:
{{{
>>> from django.http.request import split_domain_port
>>> split_domain_port('my_service:8000')
('', '')
>>> split_domain_port('myservice.com:8000')
('myservice.com', '8000')
>>> split_domain_port('my-service.com:8000')
('my-service.com', '8000')
}}}
Please see TicketClosingReasons/UseSupportChannels.
--
Ticket URL: <https://code.djangoproject.com/ticket/31768#comment:1>