417 Expectation Failed Cast Iron

May 4, 2010

We're migrating lots of users from Cast Iron to Cast Iron 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.


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.


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


Add this option to the source:

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