From 858738d75e4bfbaafac11d7f2b686df9cc087cc3 Mon Sep 17 00:00:00 2001 From: Eric Kok Date: Mon, 27 Aug 2012 16:05:56 +0200 Subject: [PATCH] Allow gzipped content in RSS feeds. --- android/src/org/ifies/android/sax/RssParser.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/android/src/org/ifies/android/sax/RssParser.java b/android/src/org/ifies/android/sax/RssParser.java index c2c260a2..98899d17 100644 --- a/android/src/org/ifies/android/sax/RssParser.java +++ b/android/src/org/ifies/android/sax/RssParser.java @@ -25,6 +25,7 @@ import org.apache.http.params.HttpConnectionParams; import org.apache.http.params.HttpParams; import org.transdroid.daemon.DaemonException; import org.transdroid.daemon.util.FakeSocketFactory; +import org.transdroid.daemon.util.HttpHelper; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; @@ -78,6 +79,9 @@ public class RssParser extends DefaultHandler HttpConnectionParams.setSoTimeout(httpparams, 5000); DefaultHttpClient httpclient = new DefaultHttpClient(new ThreadSafeClientConnManager(httpparams, registry), httpparams); + httpclient.addRequestInterceptor(HttpHelper.gzipRequestInterceptor); + httpclient.addResponseInterceptor(HttpHelper.gzipResponseInterceptor); + return httpclient; }