HTTP 417 Expectation Failed vs 520 Web Server Returned an Unknown Error
HTTP 417 (Expectation Failed) is a 4xx Client Error response, while 520 (Web Server Returned an Unknown Error) is a 5xx Server Error response. 417 indicates that the server cannot meet the requirements of the Expect header. In contrast, 520 means that cloudflare-specific. The origin server returned an unexpected response that Cloudflare could not process.
Description
The server cannot meet the requirements of the Expect header.
When You See It
When the server doesn't support Expect: 100-continue.
How to Fix
Remove the Expect header from your request.
Description
Cloudflare-specific. The origin server returned an unexpected response that Cloudflare could not process.
When You See It
When Cloudflare receives an empty, unknown, or malformed response from the origin.
How to Fix
Check origin server logs. Ensure responses include proper headers. Verify SSL configuration.
Key Differences
417 is a 4xx Client Error response, while 520 is a 5xx Server Error response.
HTTP 417: The server cannot meet the requirements of the Expect header.
HTTP 520: Cloudflare-specific. The origin server returned an unexpected response that Cloudflare could not process.
You encounter 417 when when the server doesn't support Expect: 100-continue.
You encounter 520 when when Cloudflare receives an empty, unknown, or malformed response from the origin.
When to Use Which
For 417 (Expectation Failed): Remove the Expect header from your request. For 520 (Web Server Returned an Unknown Error): Check origin server logs. Ensure responses include proper headers. Verify SSL configuration.