Reference guide · http-status · Published 2026-08-16 · 3 min read
HTTP 417 Expectation Failed explained
HTTP 417 Expectation Failed means the server cannot meet the clients Expect request-header expectation. Learn what causes 417 and how to disable it.
- ·What 417 means
- ·Expect 100-continue
- ·When you see it
What 417 means
HTTP 417 Expectation Failed is returned by a server when a client sends an Expect request header that names a condition the server is not prepared to meet. The status tells the client to not bother sending the rest of the request body, because the server already knows it cannot satisfy the requested expectation.
In practice almost the only defined use of Expect is the value 100-continue. A client sends Expect: 100-continue to ask the server whether it will accept a large body before the client uploads potentially megabytes of data. The server replies 100 Continue to say "go ahead", or an error status such as 413 or 417 to say "do not send the body".
Expect 100-continue
The normal flow for a large upload looks like this:
- The client sends the request headers, including
Expect: 100-continue. - The server responds
100 Continuewhen it is willing to receive the body. - The client uploads the body and the server finishes with a final status.
The Expect: 100-continue handshake exists to avoid wasting a big upload that the server would reject anyway. 417 only appears when a server receives an Expect value it does not recognise or cannot honour, which is uncommon because most servers either ignore unknown expectations or default to accepting the request.
A related response is 100 Continue, which is the informational "proceed" signal rather than a terminal status. Historically some older clients and proxies mishandled the handshake, which is why HTTP clients once documented workarounds to disable the expectation header.
When you see it
417 is rarely returned. When it is, the usual causes are:
- An intermediate proxy or firewall that does not understand the
Expectheader and rejects the request. - A client sending a non-standard
Expectvalue that the server refuses. - An application framework configured to reject the expectation header instead of handling it.
Actionable steps:
- Confirm whether the client or an intermediate proxy is adding the
Expectheader. - In a testing context, retry the request without the
Expect: 100-continueheader. - For a genuine application bug, fix the code path that attaches an unsupported expectation.
Because 417 indicates the request itself was refused, treat it as a client-side condition rather than a server fault. It is a member of the client error family, alongside HTTP 400 for malformed requests and HTTP 405 when a method is unsupported.