HTTP 417 — Expectation Failed
HTTP 417
Expectation Failed
The server cannot meet the requirement set in the request's Expect header.
What 417 actually means
The only `Expect` value ever defined is `100-continue`, so in practice this means a server or proxy in the path will not play the "send me your headers first" game. It typically appears when a client that adds `Expect: 100-continue` automatically — curl does this for bodies over 1 KB — talks to an older proxy or a server that does not implement it. The fix is to stop sending the expectation.
Common causes
- A proxy or server that does not support `Expect: 100-continue`
- curl adding the header automatically for a large body
- A legacy HTTP/1.0 intermediary in the request path
If you're just trying to view the page
- Nothing in a browser — browsers do not send `Expect` headers
- If a desktop tool produced it, check for an update; older HTTP libraries hit this more often
If it's your site
- Disable the expectation: with curl, add `-H "Expect:"` to send an empty header and suppress it
- In .NET, set `ServicePointManager.Expect100Continue = false`
- On the server, accept and honour `100-continue` rather than rejecting it — it is cheap to support
Reference
- Status code
- 417
- Reason phrase
- Expectation Failed
- Category
- 4xx — Client Error
- Defined in
- RFC 9110 §15.5.18
Common questions
- What does HTTP 417 mean?
- The server cannot meet the requirement set in the request's Expect header. The only `Expect` value ever defined is `100-continue`, so in practice this means a server or proxy in the path will not play the "send me your headers first" game. It typically appears when a client that adds `Expect: 100-continue` automatically — curl does this for bodies over 1 KB — talks to an older proxy or a server that does not implement it.
- How do I fix a 417 error?
- Nothing in a browser — browsers do not send `Expect` headers
- Is 417 a client error or a server error?
- 417 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