417 Expectation Failed Cast Iron

May 4, 2010

We're migrating lots of users from Cast Iron 3.6.2.5 to Cast Iron 4.0.5.1. We're having lots of trouble with the Expect header.

417 Expectation Failed

The expectation given in the Expect request-header
field could not be met by this server.
The client sent
    Expect: 100-continue

but we only allow the 100-continue expectation.

which makes a lot of sense! (You sent this, we only support...er, exactly what you sent!)

We're having to get clients to remove this header.

.NET

The System.Net.ServicePointManager class has a static property named Expect100Continue. Setting this to false will stop the header "Expect: 100-Continue" from being sent.

Curl

You can use the -H option of curl to turn off the Expect header. eg: -H 'Expect: '

PHP cURL

Add this option to the source:

curl_setopt( $curl_handle, CURLOPT_HTTPHEADER, array( 'Expect:' ) );

References