Opened 8 years ago

Closed 8 years ago

#26550 closed Uncategorized (duplicate)

Underscore (_) is not allowed in domain names

Reported by: Fedor Tyurin Owned by: nobody
Component: HTTP handling Version: 1.8
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

I'm using domain name like xxx_yyy.abc.com and I get "Bad Request (400)" when DEBUG = False.

I happened to be so that split_domain_port(host) from django/http/request.py returns a pair of empty strings as host_validation_re doesn't allow underscore.

I agree that according to RFC it's not possible to have underscore in a hostname, but here we are dealing with domain names and it's totally fine to have underscore in a domain name.

Change History (1)

comment:1 by Tim Graham, 8 years ago

Component: UncategorizedHTTP handling
Resolution: duplicate
Status: newclosed

Duplicate of #19952

Note: See TracTickets for help on using tickets.
Back to Top