From ffdb17578754105930c12cf7989a06914b96190f Mon Sep 17 00:00:00 2001 From: Jesse Wilson Date: Thu, 6 May 2010 14:42:10 -0700 Subject: Turning off expect-continue by default in Apache HTTP client. Change-Id: I24d9950e23596770c4b2835f3f3c23ced9cb7651 http://b/2471595 --- src/org/apache/http/impl/client/DefaultHttpClient.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/org/apache/http/impl/client/DefaultHttpClient.java b/src/org/apache/http/impl/client/DefaultHttpClient.java index f0b694e..7dcb2a2 100644 --- a/src/org/apache/http/impl/client/DefaultHttpClient.java +++ b/src/org/apache/http/impl/client/DefaultHttpClient.java @@ -131,8 +131,15 @@ public class DefaultHttpClient extends AbstractHttpClient { HttpVersion.HTTP_1_1); HttpProtocolParams.setContentCharset(params, HTTP.DEFAULT_CONTENT_CHARSET); + + /* + * Android note: Send each request body without first asking the server + * whether it will be accepted. Asking first slows down the common case + * and results in "417 expectation failed" errors when a HTTP/1.0 server + * is behind a proxy. http://b/2471595 + */ HttpProtocolParams.setUseExpectContinue(params, - true); + false); // android-changed // determine the release version from packaged version info final VersionInfo vi = VersionInfo.loadVersionInfo -- cgit v1.1