Skip to content

Commit

Permalink
set HttpClient HTTP 1.1, based on sztomi commit
Browse files Browse the repository at this point in the history
  • Loading branch information
talklittle committed Nov 21, 2011
1 parent ca14155 commit 5ad88bc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/com/andrewshu/android/reddit/common/Common.java
Expand Up @@ -36,6 +36,7 @@
import org.apache.http.HttpRequestInterceptor;
import org.apache.http.HttpResponse;
import org.apache.http.HttpResponseInterceptor;
import org.apache.http.HttpVersion;
import org.apache.http.client.CookieStore;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
Expand All @@ -48,6 +49,8 @@
import org.apache.http.entity.HttpEntityWrapper;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.CoreProtocolPNames;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.apache.http.protocol.HttpContext;
Expand Down Expand Up @@ -520,7 +523,10 @@ public static CookieStore getCookieStore() {
}

private static DefaultHttpClient createGzipHttpClient() {
DefaultHttpClient httpclient = new DefaultHttpClient(){
HttpParams params = new BasicHttpParams();
params.setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_1);

DefaultHttpClient httpclient = new DefaultHttpClient(params) {
@Override
protected ClientConnectionManager createClientConnectionManager() {
SchemeRegistry registry = new SchemeRegistry();
Expand Down

0 comments on commit 5ad88bc

Please sign in to comment.