From 844782d81e12d8bd13c9b26a5f7aab3f4be81b5a Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Mon, 18 Mar 2013 18:30:02 -0700 Subject: Defeat transparent Accept-Encoding: gzip. Transparent gzip encoding doesn't allow us to easily resume partial requests, so defeat it for now. Bug: 8409417 Change-Id: I1172709c09d1153fff1ba8df072a9bef896e244d --- src/com/android/providers/downloads/DownloadThread.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/com/android/providers/downloads') diff --git a/src/com/android/providers/downloads/DownloadThread.java b/src/com/android/providers/downloads/DownloadThread.java index a0b3e54a..f1add241 100644 --- a/src/com/android/providers/downloads/DownloadThread.java +++ b/src/com/android/providers/downloads/DownloadThread.java @@ -818,6 +818,10 @@ public class DownloadThread implements Runnable { conn.addRequestProperty("User-Agent", userAgent()); } + // Defeat transparent gzip compression, since it doesn't allow us to + // easily resume partial downloads. + conn.setRequestProperty("Accept-Encoding", "identity"); + if (state.mContinuingDownload) { if (state.mHeaderETag != null) { conn.addRequestProperty("If-Match", state.mHeaderETag); -- cgit v1.2.3