Apache HTTP client version 4.0 (at least, the version bundled with the Android SDK) adds the header "Expect: 100-Continue" by default, which confuses many web servers. The following snippet switches this header off:
HttpClient client = new DefaultHttpClient();
client.getParams().setBooleanParameter(CoreProtocolPNames.USE_EXPECT_CONTINUE, false);
I was seeing an error response like the following before I switched this header off:
HTTP/1.1 417 Expectation Failed.
Date: Tue, 30 Jun 2009 10:03:59 GMT.
Server: hi.
Vary: Accept-Encoding.
Content-Length: 364.
Connection: close.
Content-Type: text/html; charset=iso-8859-1.
417 Expectation Failed
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.
Org-mode PDF export failure
-
Having replaced my laptop due to a tea related accident, I am finding a few
things that I need to reconfigure. Org exports are one of them. On my new
fedor...
14 years ago
Awesome !!!!! u rock !!!!
ReplyDeletei was banging my head over this since weeks !!! :D