Skip to content

417 Expectation Failed

The expectation in the request's Expect header cannot be met by the server.

Status

HTTP/1.1 417 Expectation Failed

Details

  • Category: 4xx
  • Status: Standard. Registered with IANA and defined by a current standards-track RFC.
  • Specification: RFC 9110 §15.5.18
  • Cacheable: Only with explicit cache headers
  • Response body: Allowed
  • Retry: Retry only after changing the request

The only registered expectation is 100-continue, so in practice 417 means a server or an intermediary in the path does not support it. The client should drop the Expect header and send the request normally.

It shows up most often with older proxies and appliances that reject anything they do not recognize in the Expect header. Modern origin servers usually ignore an unsupported expectation instead of failing.

Headers

  • Expect: The request header that could not be satisfied.

Common causes

  • An intermediary that does not implement 100-continue rejected the expectation.
  • A client sent a non-standard expectation value.

How to fix it

As the client

  • Remove the expectation and retry. With curl that is -H 'Expect:'.
  • Configure the HTTP library to skip the continue handshake for large bodies if a proxy in the path keeps rejecting it.

As the server

  • Ignore unknown expectations rather than failing, unless strict behavior is required.
  • Support 100-continue on endpoints that accept large uploads. It saves bandwidth on rejected requests.

Examples

An intermediary that does not support 100-continue

HTTP request

POST /upload HTTP/1.1
Host: api.example.com
Expect: 100-continue
Content-Length: 10485760

HTTP response

HTTP/1.1 417 Expectation Failed

Specifications

See also