summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2010-04-26 10:11:35 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-04-26 10:11:35 -0700
commit88b299b123c7add985c78deb085880733c0dc7ea (patch)
tree5f14eeca9a892010eebb5e97f033bbe530371f16
parent9c61788be1be5d305218737e504625ca428cd475 (diff)
parent93970f55bd081a2b7df71a1205e070922381651e (diff)
downloadframeworks_base-88b299b123c7add985c78deb085880733c0dc7ea.zip
frameworks_base-88b299b123c7add985c78deb085880733c0dc7ea.tar.gz
frameworks_base-88b299b123c7add985c78deb085880733c0dc7ea.tar.bz2
am 93970f55: am 60ae65ed: am 87782f2b: Merge "Restrict the range request to the servers claiming that they accept ranges. This may be too restrict as the spec says the server MAY set this in the response header. But this is the last minute change made in https://andro
-rw-r--r--core/java/android/net/http/Request.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/net/http/Request.java b/core/java/android/net/http/Request.java
index f1ebb47..8c0d503 100644
--- a/core/java/android/net/http/Request.java
+++ b/core/java/android/net/http/Request.java
@@ -268,7 +268,10 @@ class Request {
if (hasBody)
entity = httpClientConnection.receiveResponseEntity(header);
- boolean supportPartialContent = v.greaterEquals(HttpVersion.HTTP_1_1);
+ // restrict the range request to the servers claiming that they are
+ // accepting ranges in bytes
+ boolean supportPartialContent = "bytes".equalsIgnoreCase(header
+ .getAcceptRanges());
if (entity != null) {
InputStream is = entity.getContent();