X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=android%2Fsrc%2Fnet%2Fsf%2Fopenrocket%2Fandroid%2Fthrustcurve%2FThrustCurveAPI.java;fp=android%2Fsrc%2Fnet%2Fsf%2Fopenrocket%2Fandroid%2Fthrustcurve%2FThrustCurveAPI.java;h=3d9ac96906f952800aa3b9089980f1b5970bf98a;hb=9349577cdfdff682b2aabd6daa24fdc3a7449b58;hp=6b74c2856221cd5526d9e943f06cde5e7db784fc;hpb=30ba0a882f0c061176ba14dbf86d3d6fad096c02;p=debian%2Fopenrocket diff --git a/android/src/net/sf/openrocket/android/thrustcurve/ThrustCurveAPI.java b/android/src/net/sf/openrocket/android/thrustcurve/ThrustCurveAPI.java index 6b74c285..3d9ac969 100644 --- a/android/src/net/sf/openrocket/android/thrustcurve/ThrustCurveAPI.java +++ b/android/src/net/sf/openrocket/android/thrustcurve/ThrustCurveAPI.java @@ -18,14 +18,14 @@ import net.sf.openrocket.motor.ThrustCurveMotorPlaceholder; public abstract class ThrustCurveAPI { - private static String url_base = "http://www.thrustcurve.org/servlets/"; - public static SearchResponse doSearch( SearchRequest request ) throws MalformedURLException, IOException { String requestString = request.toString(); AndroidLogWrapper.d(ThrustCurveAPI.class, "doSearch: " + requestString); - URL url = new URL(url_base + "search"); + // Froyo has troubles resolving URLS constructed with protocols. Because of this + // we need to do it in parts. + URL url = new URL("http", "www.thrustcurve.org", "/servlets/search"); OutputStream stream; @@ -58,7 +58,9 @@ public abstract class ThrustCurveAPI { String requestString = dr.toString(); AndroidLogWrapper.d(ThrustCurveAPI.class, "downloadData: " + requestString); - URL url = new URL(url_base + "download"); + // Froyo has troubles resolving URLS constructed with protocols. Because of this + // we need to do it in parts. + URL url = new URL("http", "www.thrustcurve.org", "/servlets/download"); OutputStream stream;