Recently we have been seeing failures to post larger images to twitter. These are still under the max size allowed, but perhaps over 600k. It seems like it might be a problem with the HTTP Continue functionality. I’m wondering if some sort of back-end changes were made with how images are received that are causing problems.
During investigation we noticed that curl was automatically putting ‘Expect: 100-continue" in the headers before, and twitter was responding with a 100 response, which curl wasn’ automatically handle. So we disabled that with a "Expect: " injected into the headers, but now we seem to be getting ssl write errors.
• We are using php/curl & tmhOAuth; upgraded to recent curl (7.21.7) and tmhOAuth (0.8.3)
• Smaller images work fine, as do all of our other REST calls
• We are using SSL
The Request Headers, dumped from the Curl Response:
POST /1.1/statuses/update_with_media.json HTTP/1.1 User-Agent: tmhOAuth 0.8.3+SSL - //github.com/themattharris/tmhOAuth Host: api.twitter.com Accept: */* Accept-Encoding: deflate, gzip Authorization: OAuth oauth_consumer_key="xxx", oauth_nonce="xxx", oauth_signature="xxx", oauth_signature_method="HMAC-SHA1", oauth_timestamp="xxx", oauth_token="xxx-xxx", oauth_version="1.0" Content-Length: 1107932 Content-Type: multipart/form-data; boundary=----------------------------4b85d0fded9f
The response we get back seems to be a failure to write:
[error] => select/poll returned error [errno] => 55
[error] => SSL_write() returned SYSCALL, errno = 104 [errno] => 55
Any thoughts on changes that were made that might be causing this, or if someone has an idea how to get curl to deal with 100 continue better would be very helpful.