Interestingly, last night when I was doing testing I noticed Twitter was
rejecting my Expect: 100-Continue header the same way you stated below.
Today, Twitter is accepting the header. I'm going to comment it out of my
code for now so I don't get unexpected results later. THe payloads are
usually so small that the 100-continue behavior shouldn't be needed.

On Thu, May 20, 2010 at 5:47 PM, Richard Barnett <
richard.d.barn...@gmail.com> wrote:

> On May 20, 10:38 pm, Cameron Kaiser <spec...@floodgap.com> wrote:
> > > I've been playing with oacurlhttps://
> code.google.com/apis/buzz/v1/oacurl.html
> > > and tried to use it to send a tweet.
> >
> > > oacurl sends Expect: 100-Continue but Twitter rejects this with "we
> > > only allow the 100-continue expectation".
> >
> > > Is this fixable, or avoidable in the meantime?  (I know about twurl,
> > > but oacurl seems generic - can I use twurl to make oauth calls to
> > > MySpace?)
> >
> > Just change the header to simply send a blank "Expect:". With regular
> > cURL a simple -H "Expect:" will work.
>
> Thanks for your reply.
>
> Although oacurl supports -H like curl, using -H "Expect:" adds a
> second Expect: header to the request, & the Twitter server still fails
> because of Expect: 100-Continue.  I'll raise the oacurl bug with one
> of the authors, but that still leaves a bug in Twitter's handling of
> Expect:.
>
> /c/download: echo "status=Testing+oacurl" | java -cp oacurl-1.0.0.jar
> com.google.oacurl.Fetch -X POST -H "Expect:" -v
> http://api.twitter.com/1/statuses/update.json
> > POST /1/statuses/update.json HTTP/1.1
> > Content-Type: application/atom+xml
> > Expect:
> > Authorization: OAuth
> oauth_token="34507306-fJYSoMdju3Vv9SecfdyCUbYu5JdlIPLyaVN3xElNw",
> oauth_consumer_key="FFUZwLopTkug9Dlj1KamA",
> oauth_signature_method="HMAC-SHA1", oauth_timestamp="1274396737",
> oauth_nonce="571291495191528", oauth_version="1.0",
> oauth_signature="CqiI%2FY%2Br96PGVPkCSClqnkmfHAo%3D"
> > Transfer-Encoding: chunked
> > Host: api.twitter.com
> > Connection: Keep-Alive
> > User-Agent: Apache-HttpClient/4.0 (java 1.5)
> > Expect: 100-Continue
> > status=Testing+oacurl[\n]
>
> -- Richard
>

Reply via email to