Project

General

Profile

Actions

Feature #1104

closed

Chunked transfer encoding not supported in request message

Added by Anonymous over 17 years ago. Updated 7 months ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
-
ASK QUESTIONS IN Forums:
No

Description

Section 3.6 of the HTTP 1.1 spec specifies, albeit indirectly, that the Transfer-Encoding header applies to all HTTP messages, not only responses:

A server which receives an entity-body with a transfer-coding it does not understand SHOULD return 501 (Unimplemented), and close the connection. A server MUST NOT send transfer-codings to an HTTP/1.0 client.

Lighttpd, as far as I can tell, does not support requests with a chunked transfer encoding, which would be desirable when sending multipart messages. Also, if you specify the chunked coding and omit the Content-Length header, Lighttpd will return a 411 error.

-- Alexander Staubo <alex

Actions #1

Updated by gstrauss over 8 years ago

While lighttpd 1.4.x should support input with Transfer-Encoding: chunked, RFC 7230 permits a server to return 411 Length Required

RFC 7230 Section 3.3.3. Message Body Length

   A server MAY reject a request that contains a message body but not a
   Content-Length by responding with 411 (Length Required).

Please set this ticket Tracker tag from Bug to Feature.

Actions #2

Updated by stbuehler over 8 years ago

  • Tracker changed from Bug to Feature
  • Description updated (diff)
  • Status changed from New to Wontfix
  • Assignee deleted (jan)

Also won't fix - it would require massive changes to the core; and right now all modules expect the content-length to be present when starting to handle a request (i.e. after receiving request headers, but possibly before the complete request body).

Actions #3

Updated by gstrauss over 8 years ago

https://github.com/lighttpd/lighttpd1.4/pull/38 applied in 06d3c75 will return 411 Length Required if client attempts to send request body via Transfer-Encoding: chunked. While it does not support transfer-encoding, detecting Transfer-Encoding: chunked and returning 411 Length Required is RFC-compliant.

Actions #4

Updated by gstrauss 7 months ago

  • Status changed from Wontfix to Fixed
  • ASK QUESTIONS IN Forums set to No

Fixed in lighttpd 1.4.44 in 2016 for #2156, but with some caveats like using (default) request offloading (not streaming request body) to some backends.

Actions

Also available in: Atom