PHP/cURL: disable 100-continue expectationPosted by Matt Thommes on December 29, 2008 | Post type: Gain Twitter recently changed their API to disallow requests with the 100-continue expectation1 included. This had an immediate effect on various third-party services using the API to post updates. View the full Google Group thread. The response coming back from the server was status 417: Expectation Failed2. This has to do with the 100-continue header, which Apache displays as such:
This 100-continue status is "expected" by default when using cURL:
To turn it off this expectation in your PHP code, use this command:
Here we're basically setting the value to nothing. I discovered this quick tip at this helpful site.
About the author(s)Matt Thommes is an independent publishing enthusiast, mobile blogger, content creator, informative writer, web developer from a suburb of Chicago. Never one to conform, Matt intends to promote the effect the web has on our lives, in an effort to intensify, instruct, and clarify all that is happening around us. Comments
|
Quick Link to this postTTIP.me/2099 |
Beautiful, thank you.
Quick Link to this comment: http://TTIP.me/c5352