I've been playing with oacurl https://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".

This seems to violate 
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.20
"Comparison of expectation values is case-insensitive for unquoted
tokens (including the 100-continue token)".

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?)

Output from oacurl (duplicate content snipped) is below:

/c/download: echo "status=Testing+oacurl" | java -cp oacurl-1.0.0.jar
com.google.oacurl.Fetch -X POST -v http://api.twitter.com/1/statuses/update.json
> POST /1/statuses/update.json HTTP/1.1
> Content-Type: application/atom+xml
> Authorization: OAuth oauth_token="34507306-xxxxx", 
> oauth_consumer_key="xxxxx", oauth_signature_method="HMAC-SHA1", 
> oauth_timestamp="1274334015", oauth_nonce="508570714177400", 
> oauth_version="1.0", oauth_signature="xxxxx"
> Transfer-Encoding: chunked
> Host: api.twitter.com
> Connection: Keep-Alive
> User-Agent: Apache-HttpClient/4.0 (java 1.5)
> Expect: 100-Continue
< HTTP/1.1 417 Expectation Failed
< Date: Thu, 20 May 2010 05:38:21 GMT
< Server: hi
< Vary: Accept-Encoding
< Content-Length: 364
< Connection: close
< Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>417 Expectation Failed</title>
</head><body>
<h1>Expectation Failed</h1>
<p>The expectation given in the Expect request-header
field could not be met by this server.</p>
<p>The client sent<pre>
    Expect: 100-Continue
</pre>
but we only allow the 100-continue expectation.</p>
</body></html>

-- Richard

Reply via email to