HTTP 417 Expectation Failed
The server or a proxy can’t meet the Expect header in the request — almost always Expect: 100-continue.
Seen on:
REST API
Meaning
Some proxies, older IIS/Lighttpd and certain WAFs reject requests carrying Expect: 100-continue with 417. Clients like .NET HttpClient, PHP cURL and curl add that header automatically for larger POST bodies, so uploads fail while small requests work.
Common causes
- Client auto-adds Expect: 100-continue for large bodies
- Proxy/WAF/server doesn’t support Expect
- Custom Expect value the server doesn’t understand
⚡ Quick fix
- Send the request without the Expect header
- Fix or upgrade the proxy that rejects it
Detailed fix by platform
PHP
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Expect:']);
.NET
- csharp
ServicePointManager.Expect100Continue = false; // .NET Framework client.DefaultRequestHeaders.ExpectContinue = false; // HttpClient
curl
curl -H 'Expect:' -F 'file=@big.zip' https://example.com/upload
How to diagnose
- Headers — Expect present in the failing request?
- Size — Do small bodies succeed?
- Hop — Which proxy returns the 417?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in HTTP
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026