HTTP 417 Expectation Failed

A parcel waits at an intake with the ready light off and an amber rejection indicator

HTTP 417 Expectation Failed means a server in the request chain cannot meet the expectation in the Expect header. In HTTP/1.1 the most familiar expectation is 100-continue, used before sending an upload.

Confirm how far the request got

Check whether the client sent an Expect header and whether the 417 arrived before the client began sending the body. A failed expectation caught by a gateway can keep the application from receiving the request at all.

Try a compatible upload

For a 417 in response to 100-continue, the HTTP standard recommends repeating the request without that expectation. First confirm whether any write took effect and whether the client can replay the body. Compare a small direct and proxied upload to identify the hop with different expectation handling. See how 100 Continue works.

Read the responses in order

An HTTP/1.1 upload client can send the method and headers with Expect: 100-continue before it starts transmitting the file. In a successful exchange, it might see 100 Continue, send the body and then receive a final status such as 201 Created. If the first response is 417, record whether the client sent any body bytes and whether the origin logged the request. A 417 after the gateway sees the headers can reveal which component refuses the expectation.

Change one setting while you test

Use a small file and a disposable test resource. In one run, record whether your HTTP client adds Expect automatically. In a second run, use the client’s documented setting to send the body without that header. Compare statuses and response timing, then repeat using the same proxy path. If the origin accepts the header directly but the intermediary rejects it, check the proxy software’s protocol support. If removing the expectation yields 413, investigate the body size limit under 413 Content Too Large.

RFC 9110.

All HTTP status codes · All proxy testing guides · Open the proxy tester