#31768 closed Cleanup/optimization (invalid)
`django.http.request` `validate_domains` - should be optional "Invalid HTTP_HOST header"
Reported by: | Mateusz Kurowski | Owned by: | nobody |
---|---|---|---|
Component: | HTTP handling | Version: | 3.0 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
https://github.com/django/django/blob/master/django/http/request.py#L129
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?
Underscores are not permitted in hostnames. If you try to use them, you'll have problems with more than just Django.
Remove the
_
:Please see TicketClosingReasons/UseSupportChannels.