Illegal Character in Query
<p>In my Application, I'm able to run this method below with following code:</p>

<pre><code>fahrtenStr = getHtml("http://myServer.com/abc/getFahrtenList.cgi?limit=15");
</code></pre>

<p>But If I try to use this version, to call the method, It doesen't work:</p>

<pre><code>String url = "http://myServer.com/abc/insert_fahrt.cgi?values="+startKM+"x"+endKM+"x"+fahrer;
getHtml(url);
</code></pre>

<p>There I got the following error Message:</p>

<pre><code>03-03 16:49:15.363: E/AndroidRuntime(21355): java.lang.IllegalArgumentException: Illegal character in query at index 65: http://myServer.com/abc/insert_fahrt.cgi?values=11003.4
03-03 16:49:15.363: E/AndroidRuntime(21355): x111111xSimon
03-03 16:49:15.363: E/AndroidRuntime(21355):    at java.net.URI.create(URI.java:727)
03-03 16:49:15.363: E/AndroidRuntime(21355):    at org.apache.http.client.methods.HttpGet.&lt;init&gt;(HttpGet.java:75)
03-03 16:49:15.363: E/AndroidRuntime(21355):    at net.x.y.fahrtenbuch.Uebersicht.getHtml(Uebersicht.java:255)
03-03 16:49:15.363: E/AndroidRuntime(21355):    at net.x.y.fahrtenbuch.Uebersicht$3$1.run(Uebersicht.java:153)
</code></pre>

<p>my function:</p>

<pre><code>    public String  getHtml(String url) throws ClientProtocolException, IOException {
    HttpClient httpClient = new DefaultHttpClient();
    HttpContext localContext = new BasicHttpContext();
    HttpGet httpGet = new HttpGet(url);
    HttpResponse response = httpClient.execute(httpGet, localContext);
    String result = "";

    BufferedReader reader = 
        new BufferedReader(new InputStreamReader(response.getEntity().getContent()));

    String line = null;
    while ((line = reader.readLine()) != null){
        result += line + "\n";
        // Toast.makeText(Connect.this, line.toString(), Toast.LENGTH_LONG).show();

    }
    return result;
}
</code></pre>

<p>And finally my used variables:</p>

<pre><code>//Variable values
    startKM: String="11003.4"
    endKM: String="11111"
    fahrer : "Simon"
</code></pre>
