HTTP 411 — Length Required
HTTP 411
Length Required
The server refuses to accept a request body without a Content-Length header.
What 411 actually means
The server needs to know up front how many bytes are coming and the client did not say. This usually means the client sent a body using chunked transfer encoding against a server that will not accept it, or omitted `Content-Length` altogether. It is a small, mechanical error — add the header and the request works — and most HTTP libraries set it for you, so it points at hand-rolled requests or an unusual proxy.
Common causes
- A request with a body but no `Content-Length` header
- Chunked transfer encoding sent to a server or proxy that requires a known length
- A hand-built HTTP request, often in a script or a raw socket client
- A streaming upload to an endpoint that will not accept one
If you're just trying to view the page
- Nothing you can act on — this is a client-side or tooling problem, not a browser one
- If a desktop application produced it, check for an update or report it
If it's your site
- Set `Content-Length` explicitly, or let your HTTP library compute it by passing a buffer rather than a stream
- If you need streaming uploads, confirm every proxy in the path supports chunked encoding
- On the server, accept chunked bodies where you can rather than rejecting them outright
Reference
- Status code
- 411
- Reason phrase
- Length Required
- Category
- 4xx — Client Error
- Defined in
- RFC 9110 §15.5.12
Common questions
- What does HTTP 411 mean?
- The server refuses to accept a request body without a Content-Length header. The server needs to know up front how many bytes are coming and the client did not say. This usually means the client sent a body using chunked transfer encoding against a server that will not accept it, or omitted `Content-Length` altogether.
- How do I fix a 411 error?
- Nothing you can act on — this is a client-side or tooling problem, not a browser one
- Is 411 a client error or a server error?
- 411 is in the 4xx range, which means client error. The request itself was the problem, so retrying it unchanged will usually return the same code.
Related pages
- 404 Not Found The server is reachable and working, but there is nothing at the address you ask
- 403 Forbidden The server understood the request and is refusing to allow it, and logging in wi
- 401 Unauthorized You need to authenticate, and either you did not or your credentials were reject
- 429 Too Many Requests You have sent more requests than the service allows in a given period.
- 400 Bad Request The server could not understand the request because something about it is malfor
- 413 Content Too Large The request body is bigger than the server is willing to accept.
- 422 Unprocessable Content The request is well-formed and understood, but the data in it fails the rules.
- 405 Method Not Allowed The URL exists, but it does not accept the HTTP method you used.
- 409 Conflict The request cannot be completed because it clashes with the current state of the
- 415 Unsupported Media Type The server will not accept the format of the body you sent.
- 408 Request Timeout The server gave up waiting for the client to finish sending its request.
- 410 Gone The resource was deliberately removed and is not coming back, and there is no fo