1
21.1 Legacy Series / Re: [SOLVED] Cannot log into webui - message 411 Length Required
« on: October 21, 2021, 07:57:13 am »
Glad you identified the actual culprit.
FYI: various gateway protocols (e.g. CGI, FastCGI, SCGI, ...) require CONTENT_LENGTH. If lighttpd is configured to stream the request body using a non-zero value, e.g.
However, if request body streaming is disabled in lighttpd.conf (the default if not specified)
Therefore, a workaround is to set
FYI: various gateway protocols (e.g. CGI, FastCGI, SCGI, ...) require CONTENT_LENGTH. If lighttpd is configured to stream the request body using a non-zero value, e.g.
Code: [Select]
server.stream-request-body = 1
, then lighttpd will return "411 Length Required" for requests containing a request body which do not provide Content-Length in the request headers (when lighttpd is required to provide CONTENT_LENGTH to backend protocols).However, if request body streaming is disabled in lighttpd.conf (the default if not specified)
Code: [Select]
server.stream-request-body = 0
, then lighttpd will collect the request body -- by decoding Transfer-Encoding: chunked (HTTP/1.1) or collecting DATA frames (HTTP/2) -- and lighttpd will set CONTENT_LENGTH for the backends.Therefore, a workaround is to set
Code: [Select]
server.stream-request-body = 0
if intermediaries impolitely modify requests to remove Content-Length.