levelup / Android-HttpClient

HttpParamsMultiPart
29 stars 10 forks source link

Bad request errors when trying to load some images #7

Closed PomepuyN closed 9 years ago

PomepuyN commented 9 years ago

Here is the code to reproduce the issue:

 HttpRequestGet<InputStream> is = new HttpRequestGet<>("http://elledecoration.se/files/2015/04/Tradera-©-Anna-Malmberg-1-700x466-430x286.jpg", XferTransformResponseInputStream.INSTANCE);
                try {
                    InputStream i = TopheClient.parseRequest(is);
                } catch (Exception e) {
                   Log.e(TAG, e.getMessage(), e);
                }

The exception looks like:

04-13 12:10:52.134  13249-13301/com.examplee E/ExampleApplication﹕ http:400 req:HttpRequestGet{42a9bb10 http://elledecoration.se/files/2015/04/Tradera-©-Anna-Malmberg-1-700x466-430x286.jpg} serverError=<html><body><h1>400 Bad request</h1>
    Your browser sent an invalid request.
    </body></html>
    ServerException http:400 req:HttpRequestGet{42a9bb10 http://elledecoration.se/files/2015/04/Tradera-©-Anna-Malmberg-1-700x466-430x286.jpg} serverError=<html><body><h1>400 Bad request</h1>
    Your browser sent an invalid request.
    </body></html>
            at co.tophe.parser.XferTransformInputStreamServerException.transformData(XferTransformInputStreamServerException.java:56)
            at co.tophe.parser.XferTransformInputStreamServerException.transformData(XferTransformInputStreamServerException.java:17)
            at co.tophe.parser.XferTransformChain.transformData(XferTransformChain.java:112)
            at co.tophe.engine.HttpEngineUrlConnection.queryResponse(HttpEngineUrlConnection.java:163)
            at co.tophe.engine.HttpEngineUrlConnection.queryResponse(HttpEngineUrlConnection.java:34)
            at co.tophe.AbstractHttpEngine.call(AbstractHttpEngine.java:175)
            at co.tophe.TopheClient.parseRequest(TopheClient.java:162)
            at java.lang.Thread.run(Thread.java:841)
robUx4 commented 9 years ago

Fixed with 5c1629691bce66de8f9df77a49fb68c976050073