Sitelet https://funapi.dev/status/411

HTTP 411 Length Required

The server refuses a request with a body but no Content-Length header, because it will not accept a chunked or unbounded body.

Defined in RFC 9110 §15.5.12 — 411 Length Required · MDN reference

Where you meet HTTP 411 in production

Older servers, some object stores and signed-upload endpoints that need the size up front, for example to verify a signature or enforce a quota before reading.

Why you would test it

A test for clients that stream request bodies. Check what your HTTP library sends when the body is a stream of unknown length — it is usually chunked encoding, and some servers refuse it.

What your client should do about a 411

Send Content-Length. Buffer the body, or compute its size before sending, instead of streaming it with Transfer-Encoding: chunked. Retrying the same streamed request will fail the same way.

411 versus the codes it gets confused with

Endpoints that return 411

1 endpoint in this playground answers with 411. Every one is free, needs no signup, and can be called from the browser or with curl.

Questions about HTTP 411

When does a client omit Content-Length?
When it streams the body with chunked transfer encoding, which is the default in many libraries for streams and generators.
Does HTTP/2 need Content-Length?
No — frames carry lengths — but servers may still require the header for application reasons.

Other client error codes

All HTTP status codes · All 39 mock REST APIs · Getting started guide

Last updated