411 Length Required

Written by Evert Pot - - Aggregated on Tuesday February 12, 2019

Most HTTP requests that have a request body, will also have a Content-Length header indicating how big the body will be. However, this is optional for some cases, such as when Chunked Transfer Coding is used.

It’s useful for a client to not include a Content-Length header for a few different cases. For instance, a client might send a HTTP request body based on a stream.

If a server does not support this feature, it can indicate this by sending back 411 Length Required.

In a situation like this, a recourse a client might have is to buffer the entire request to determine the real length.


HTTP/1.1 411 Length Required
Content-Type: text/html
Server: curveball/0.6.0

<h1>This server requires a Content-Length</h1>


« Lead, follow, or get out of MY way - Cal Evans

Bram.us - Quickly browse the history of any … »