Reference guide · http-status · Published 2026-08-16 · 3 min read

HTTP 417 Expectation Failed explained

HTTP 417 Expectation Failed means the server cannot meet the clients Expect request-header expectation. Learn what causes 417 and how to disable it.

Flat editorial illustration showing a lantern-style status readout with a neat row of stacked directory rails, each rail marked with an abstract tally.
Illustration: this article at a glance.

What 417 means

HTTP 417 Expectation Failed is returned by a server when a client sends an Expect request header that names a condition the server is not prepared to meet. The status tells the client to not bother sending the rest of the request body, because the server already knows it cannot satisfy the requested expectation.

In practice almost the only defined use of Expect is the value 100-continue. A client sends Expect: 100-continue to ask the server whether it will accept a large body before the client uploads potentially megabytes of data. The server replies 100 Continue to say "go ahead", or an error status such as 413 or 417 to say "do not send the body".

Expect 100-continue

The normal flow for a large upload looks like this:

  1. The client sends the request headers, including Expect: 100-continue.
  2. The server responds 100 Continue when it is willing to receive the body.
  3. The client uploads the body and the server finishes with a final status.

The Expect: 100-continue handshake exists to avoid wasting a big upload that the server would reject anyway. 417 only appears when a server receives an Expect value it does not recognise or cannot honour, which is uncommon because most servers either ignore unknown expectations or default to accepting the request.

A related response is 100 Continue, which is the informational "proceed" signal rather than a terminal status. Historically some older clients and proxies mishandled the handshake, which is why HTTP clients once documented workarounds to disable the expectation header.

When you see it

417 is rarely returned. When it is, the usual causes are:

Actionable steps:

Because 417 indicates the request itself was refused, treat it as a client-side condition rather than a server fault. It is a member of the client error family, alongside HTTP 400 for malformed requests and HTTP 405 when a method is unsupported.

Need a website built, fixed, optimised, migrated or replaced?

This technical resource is written by CSMBAC, a small design and development studio. If you would rather hand the problem to a professional, the website service page explains how we build enquiry-ready websites.

Explore website services