At One Place

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

  1. Nothing in a browser — browsers do not send `Expect` headers
  2. If a desktop tool produced it, check for an update; older HTTP libraries hit this more often

If it's your site

  1. Disable the expectation: with curl, add `-H "Expect:"` to send an empty header and suppress it
  2. In .NET, set `ServicePointManager.Expect100Continue = false`
  3. 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

Sources

  1. Hypertext Transfer Protocol (HTTP) Status Code Registry — IANA
  2. RFC 9110: HTTP Semantics — IETF

How these figures are compiled and checked