HTTP 417 Expectation Failed — What It Means

What HTTP status code 417 Expectation Failed means, when servers return it, and how to handle it correctly.

Published September 25, 2026

HTTP 417 Expectation Failed means the server cannot meet the requirements in the Expect request header.

What it means

It is almost always about Expect: 100-continue, which some proxies or servers do not support.

Common causes: Proxy rejecting Expect: 100-continue; Old HTTP servers; Unsupported expectations.

On the wire

POST /upload HTTP/1.1
HTTP/1.1 417 Expectation Failed
Expect: 100-continue
A typical 417 exchange.

Practical examples

Test it from the shell

curl -i https://example.com/path   # look for HTTP 417

Handling 417 in code or config

curl -H 'Expect:' -T file.bin https://example.com/upload

How to fix it

Disable the Expect header in the client; Upgrade the proxy; Send the body directly.

1. Reproduce: curl -i <url>
2. Confirm the status is 417
3. Apply the fix above and re-test

Common mistakes

  • Disable the Expect header in the client
  • Upgrade the proxy
  • Ignoring the response headers that explain the details.

Key takeaways

  • 417 means Expectation Failed.
  • HTTP 417 Expectation Failed means the server cannot meet the requirements in the Expect request header.
  • Read the response headers and logs for the exact cause.

FAQ

How do I disable Expect in curl?

Pass -H 'Expect:' with an empty value.

Is 417 a client or server error?

It is a client error status code, in the 4xx class.

More HTTP articles