Bug #1016

header Content-Disposition with russian '?' (CP1251, ascii code 255) causes error

Added by Anonymous over 12 years ago. Updated about 11 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Missing in 1.5.x:


- error

- normal

------part of error.log-------
http_req.c.270: (trace) parsing failed ... (no error-msg)
http_resp.c.247: (trace) parsing failed ...
mod_proxy_core.c.1905: (trace) state: 5 (error)
connections.c.1201: (trace) (error) plugins_call_handle_send_request_content(): r = 5

-- mixsture

Related issues

Related to Feature #602: Russian letters not alowed?Fixed


Associated revisions

Revision b47494d4 (diff)
Added by gstrauss about 3 years 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"

"lighttpd doesn't allow underscores in host names"
"hyphen in hostname"
"a numeric tld"
"Numeric tld's"
"Bad Request"
"400 Bad Request when using Numeric TLDs"

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"

"URL encoding leads to "400 - Bad Request""
"400 Bad Request when using IP's numeric value ("ip2long()")"

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

"Russian letters not alowed?"
"header Content-Disposition with russian '?' (CP1251, ascii code 255) causes error"



Updated by jwmcglynn over 12 years ago

This bug is due to not allowing the ASCII 255 character in the request or response header, and is the same as #602.


Updated by jwmcglynn about 12 years ago

I think that ASCII 255 should be allowed. It is only a control character for telnet and FTP (which specifically allows some telnet control codes). The HTTP spec doesn't specifically disallow 255, but it also doesn't specifically allow other characters that are currently accepted.


Updated by stbuehler about 11 years ago

  • Status changed from New to Fixed
  • Resolution set to duplicate

Updated by gstrauss about 3 years ago

  • Related to Feature #602: Russian letters not alowed? added

Also available in: Atom