Project

General

Profile

Bug #2281

400 Bad Request when using Numeric TLDs

Added by khemael over 6 years ago. Updated about 1 year ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
2010-12-22
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:
No

Description

When using full numeric TLDs, lighttpd (any version) always respond with a bad request.

Reproductible : Anytime
Version : Any


Related issues

Related to Bug #2258: Bad RequestInvalid2010-09-15

Is duplicate of Bug #2143: Numeric tld'sFixed2009-12-31

Associated revisions

Revision b47494d4 (diff)
Added by gstrauss about 1 year ago

[config] opts for http header parsing strictness (fixes #551, fixes #1086, fixes #1184, fixes #2143, #2258, #2281, fixes #946, fixes #1330, fixes #602, #1016)

server.http-parseopt-header-strict = "enable"
server.http-parseopt-host-strict = "enable" (implies host-normalize)
server.http-parseopt-host-normalize = "disable"

defaults retain current behavior, which is strict header parsing
and strict host parsing, with enhancement to normalize IPv4 address
and port number strings.

For lighttpd tests, these need to be enabled (and are by default)
For marginally faster HTTP header parsing for benchmarks, disable these.

To allow
- underscores in hostname
- hypen ('-') at beginning of hostname
- all-numeric TLDs
server.http-parseopt-host-strict = "disable"

x-ref:
"lighttpd doesn't allow underscores in host names"
https://redmine.lighttpd.net/issues/551
"hyphen in hostname"
https://redmine.lighttpd.net/issues/1086
"a numeric tld"
https://redmine.lighttpd.net/issues/1184
"Numeric tld's"
https://redmine.lighttpd.net/issues/2143
"Bad Request"
https://redmine.lighttpd.net/issues/2258
"400 Bad Request when using Numeric TLDs"
https://redmine.lighttpd.net/issues/2281

To allow a variety of numerical formats to be converted to IP addresses
server.http-parseopt-host-strict = "disable"
server.http-parseopt-host-normalize = "enable"

x-ref:
"URL encoding leads to "400 - Bad Request""
https://redmine.lighttpd.net/issues/946
"400 Bad Request when using IP's numeric value ("ip2long()")"
https://redmine.lighttpd.net/issues/1330

To allow most 8-bit and 7-bit chars in headers
server.http-parseopt-header-strict = "disable" (not recommended)

x-ref:
"Russian letters not alowed?"
https://redmine.lighttpd.net/issues/602
"header Content-Disposition with russian '?' (CP1251, ascii code 255) causes error"
https://redmine.lighttpd.net/issues/1016

History

#1 Updated by icy over 6 years ago

  • Status changed from New to Duplicate

#2 Updated by nitrox over 6 years ago

RFC2616

14.23 Host
   Host = "Host" ":" host [ ":" port ] ;

3.2.1 General Syntax
   RFC 2396 [42] (which replaces RFCs
   1738 [4] and RFC 1808 [11]). This specification adopts the
   definitions of "URI-reference", "absoluteURI", "relativeURI", "port",
   "host","abs_path", "rel_path", and "authority" from that
   specification.

RFC2396

3.2.2. Server-based Naming Authority

      host          = hostname | IPv4address
      hostname      = *( domainlabel "." ) toplabel [ "." ]
      domainlabel   = alphanum | alphanum *( alphanum | "-" ) alphanum
      toplabel      = alpha | alpha *( alphanum | "-" ) alphanum

So toplabel is alpha.
ICANNĀ“s mentioned "ideas" from #2143 are just a "Draft".

#3 Updated by khemael over 6 years ago

Hi,

First : Our company uses Numeric only TLD's internal. Lighttpd is the only soft to fail with that.
Also, ICANN does not say TLD 'MUST' be alpha, but "MAY NOT" be full numerical.

also : http://www.ietf.org/mail-archive/web/dnsop/current/msg08941.html

ietf is using pseudo-TLD's to test numericals tld.

#4 Updated by gstrauss about 1 year ago

  • Target version set to 1.4.40

Also available in: Atom