[Esbox-commits] r2356 - branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/api/vm/vmware

fabricioepa at garage.maemo.org fabricioepa at garage.maemo.org
Wed Oct 28 19:07:03 EET 2009


Author: fabricioepa
Date: 2009-10-28 19:06:57 +0200 (Wed, 28 Oct 2009)
New Revision: 2356

Modified:
   branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/api/vm/vmware/MaemoSDKVMDownloader.java
Log:
Fixing BUG #4740

Modified: branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/api/vm/vmware/MaemoSDKVMDownloader.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/api/vm/vmware/MaemoSDKVMDownloader.java	2009-10-27 19:58:31 UTC (rev 2355)
+++ branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/api/vm/vmware/MaemoSDKVMDownloader.java	2009-10-28 17:06:57 UTC (rev 2356)
@@ -123,8 +123,9 @@
 		HttpURLConnection connection = null;
 				
 		try {
-			connection = connectWithPostMethod(new URL(
-					MaemoSDKVMInfo.DOWNLOAD_PAGE));
+			connection = connectWithPostMethod(new URL(MaemoSDKVMInfo.DOWNLOAD_PAGE));
+			connection.disconnect();
+			connection.connect();//forcing to get the new response from server and resetfrom input stream
 			responsePage = getResponse(connection);
 			if (responsePage == null) {
 				throw new MicaException("Response page is empty"); //$NON-NLS-1$
@@ -139,6 +140,7 @@
 				connection.disconnect();
 
 		}
+		;
 		return responsePage;
 	}
 	
@@ -158,8 +160,7 @@
 			conn.setRequestMethod("POST"); //$NON-NLS-1$
 			conn.setDoOutput(true);
 			conn.setDoInput(true);
-			conn.setRequestProperty("Content-Type",
-			"application/x-www-form-urlencoded");
+			conn.setRequestProperty("Content-Type",	"application/x-www-form-urlencoded");
 			out = new OutputStreamWriter(conn.getOutputStream());
 			out.write("agree=I accept");
 			out.flush();



More information about the Esbox-commits mailing list