HTTP 417 Expectation Failed

The server cannot meet the requirement in the request’s Expect header.

Updated

417
Expectation Failed
4xx Client error
Class
RFC 9110 §15.5.18
Defined in

What does HTTP 417 mean?

The server cannot meet the requirement in the request’s Expect header. Almost always about Expect: 100-continue, which curl and .NET send before uploading large bodies. Some proxies and old servers reject it.

4xx Client error: The request has a problem the client can fix: wrong URL, missing credentials, bad data or too many requests.

Common causes of a 417 error

  • A proxy or server that does not support Expect: 100-continue.
  • An HTTP client sending Expect to an endpoint that does not allow it.

How to fix 417 Expectation Failed

  • Disable the header in the client: curl -H "Expect:", or in .NET set ServicePointManager.Expect100Continue = false.
  • Upgrade or reconfigure the proxy in front of the server.

417 and SEO

No SEO impact: browsers don’t send Expect for page loads.

Example response

HTTP/1.1 417 Expectation Failed

How to return a 417 response

Node.js (Express)

res.status(417).json({ error: 'Expectation Failed' });

PHP

http_response_code(417);

Python (Flask)

return {'error': 'Expectation Failed'}, 417

Go (net/http)

w.WriteHeader(417)

nginx

return 417;

Related status codes

  • 100 Continue — The server has received the request headers and the client may send the body.
  • 400 Bad Request — The server cannot process the request because it is malformed.
  • 413 Content Too Large — The request body is larger than the server allows.

Check which status code a URL returns with the HTTP header checker.

All HTTP status codesSearch the full list of status codes from 100 to 599 with their meanings and SEO impact.
Open the full list

Frequently asked questions

What does status code 417 mean?
417 Expectation Failed: The server cannot meet the requirement in the request’s Expect header.
How do I fix a 417 error?
Disable the header in the client: curl -H "Expect:", or in .NET set ServicePointManager.Expect100Continue = false. Upgrade or reconfigure the proxy in front of the server.
Does 417 affect SEO?
No SEO impact: browsers don’t send Expect for page loads.