4xx

417 Expectation Failed

The server cannot meet the requirements specified in the Expect request header.

What is HTTP 417?

This status code indicates that the expectation given in the request's Expect header could not be met by the server. The most common expectation is Expect: 100-continue, which asks the server to confirm it will accept the body before the client sends it. If the server cannot fulfill this expectation, it responds with 417. In practice, this is rare because most servers support the 100-continue mechanism.

Defined in RFC 9110

Common Causes

  • A server or proxy does not support the Expect: 100-continue mechanism
  • The server determined it will reject the request body before receiving it
  • A reverse proxy or middleware stripped or mishandled the Expect header

How to Fix

  • Remove the Expect header and send the request body directly without waiting for confirmation
  • Configure your HTTP client to disable the Expect: 100-continue behavior
  • If using a proxy, check that it correctly forwards or handles Expect headers