Merge commit '42b2e5ca519766e37ce6941ba4faecc9691cc403' into upstream
[debian/openrocket] / android / src / net / sf / openrocket / android / thrustcurve / ThrustCurveAPI.java
index 6b74c2856221cd5526d9e943f06cde5e7db784fc..3d9ac96906f952800aa3b9089980f1b5970bf98a 100644 (file)
@@ -18,14 +18,14 @@ import net.sf.openrocket.motor.ThrustCurveMotorPlaceholder;
 \r
 public abstract class ThrustCurveAPI {\r
 \r
-       private static String url_base = "http://www.thrustcurve.org/servlets/";\r
-       \r
        public static SearchResponse doSearch( SearchRequest request ) throws MalformedURLException, IOException {\r
                \r
                String requestString = request.toString();\r
                \r
                AndroidLogWrapper.d(ThrustCurveAPI.class, "doSearch: " + requestString);\r
-               URL url = new URL(url_base + "search");\r
+               // Froyo has troubles resolving URLS constructed with protocols.  Because of this\r
+               // we need to do it in parts.\r
+               URL url = new URL("http", "www.thrustcurve.org", "/servlets/search");\r
 \r
         OutputStream  stream;\r
 \r
@@ -58,7 +58,9 @@ public abstract class ThrustCurveAPI {
                String requestString = dr.toString();\r
 \r
                AndroidLogWrapper.d(ThrustCurveAPI.class, "downloadData: " + requestString);\r
-               URL url = new URL(url_base + "download");\r
+               // Froyo has troubles resolving URLS constructed with protocols.  Because of this\r
+               // we need to do it in parts.\r
+               URL url = new URL("http", "www.thrustcurve.org", "/servlets/download");\r
 \r
                OutputStream  stream;\r
 \r