summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2010-08-18 15:41:29 -0700
committerJean-Baptiste Queru <jbq@google.com>2010-08-18 15:41:41 -0700
commitc70bdbc1eb32e81259dbb4a5c028efef354e9c54 (patch)
tree7b75c46004b807f9a00d6bd39a35f03add671a49
parent3b74bc0ac45043a6b559d44aa913de5803793a56 (diff)
parentca487d902d42621b5db886d13d2acb4c9500a44c (diff)
downloadexternal_apache-http-c70bdbc1eb32e81259dbb4a5c028efef354e9c54.zip
external_apache-http-c70bdbc1eb32e81259dbb4a5c028efef354e9c54.tar.gz
external_apache-http-c70bdbc1eb32e81259dbb4a5c028efef354e9c54.tar.bz2
manual merge - fix build
Change-Id: I5417fd6ad71fd3cd0520f1fe89921fa01f8a0869
-rw-r--r--src/org/apache/http/impl/client/DefaultHttpClient.java9
-rw-r--r--src/org/apache/http/params/CoreProtocolPNames.java4
-rw-r--r--src/org/apache/http/protocol/HTTP.java2
3 files changed, 11 insertions, 4 deletions
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
diff --git a/src/org/apache/http/params/CoreProtocolPNames.java b/src/org/apache/http/params/CoreProtocolPNames.java
index a42c5de..a0a726d 100644
--- a/src/org/apache/http/params/CoreProtocolPNames.java
+++ b/src/org/apache/http/params/CoreProtocolPNames.java
@@ -94,8 +94,8 @@ public interface CoreProtocolPNames {
/**
* <p>
- * Activates 'Expect: 100-Continue' handshake for the
- * entity enclosing methods. The purpose of the 'Expect: 100-Continue'
+ * Activates 'Expect: 100-continue' handshake for the
+ * entity enclosing methods. The purpose of the 'Expect: 100-continue'
* handshake to allow a client that is sending a request message with
* a request body to determine if the origin server is willing to
* accept the request (based on the request headers) before the client
diff --git a/src/org/apache/http/protocol/HTTP.java b/src/org/apache/http/protocol/HTTP.java
index de76ca6..9223955 100644
--- a/src/org/apache/http/protocol/HTTP.java
+++ b/src/org/apache/http/protocol/HTTP.java
@@ -60,7 +60,7 @@ public final class HTTP {
public static final String SERVER_HEADER = "Server";
/** HTTP expectations */
- public static final String EXPECT_CONTINUE = "100-Continue";
+ public static final String EXPECT_CONTINUE = "100-continue";
/** HTTP connection control */
public static final String CONN_CLOSE = "Close";