Turning off expect-continue by default in Apache HTTP client.
Change-Id: I24d9950e23596770c4b2835f3f3c23ced9cb7651
http://b/2471595
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 @@
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