package org.canthack.tris.pipurr.client;

import java.io.IOException;

import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;

import android.os.AsyncTask;

public class GetUrlTask extends AsyncTask<String, Integer, Void> {

	protected Void doInBackground(String... urls) {
		
		HttpClient httpClient = CustomHTTPClient.getHttpClient();
		try {
			HttpGet request = new HttpGet(urls[0]);
			HttpParams params = new BasicHttpParams();
			HttpConnectionParams.setSoTimeout(params, 60000);   // 1 minute
			request.setParams(params);

			/*HttpResponse response =*/ httpClient.execute(request);	
			
		} 
		catch (IOException e) {
			e.printStackTrace();
		}

		return null;
	}


}
@@ -64,16 +64,53 @@
 ption;%0A%0A
+import org.apache.http.HttpResponse;%0A
 import o
@@ -744,10 +744,8 @@
 %0A%09%09%09
-/*
 Http
@@ -767,10 +767,8 @@
 se =
-*/
  htt
@@ -794,16 +794,58 @@
 uest);%09%0A
+%09%09%09response.getEntity().consumeContent();%0A
 %09%09%09%0A%09%09%7D 

Fix connection leak.