levelup / android-httpclient Goto Github PK
View Code? Open in Web Editor NEWHome Page: HttpParamsMultiPart
Home Page: HttpParamsMultiPart
Using ""
works but it would be cleaner if null was accepter
Hi, in past several weeks I have many users complaining about bad networking experience.
Managed to get logs and here is what I have.
Tried to extend timeout to 30 seconds and it didn't helped.
exception during loading
HttpTimeoutException http:-1 req:HttpTwitterRequest{16c5486b https://api.twitter.com/1.1/statuses/mentions_timeline.json?include_entities=true&contributor_details=false&trim_user=false&include_rts=true&count=200&since_id=569566499867901951 for Account:Twi:debuggerUA:Denis Babak} Timeout error null
at co.tophe.HttpTimeoutException$Builder.build(HttpTimeoutException.java:21)
at co.tophe.HttpTimeoutException$Builder.build(HttpTimeoutException.java:14)
at co.tophe.ion.HttpEngineIon.queryResponse(HttpEngineIon.java:176)
at co.tophe.ion.HttpEngineIon.queryResponse(HttpEngineIon.java:67)
at co.tophe.AbstractHttpEngine.call(AbstractHttpEngine.java:175)
at com.plume.twitter.TwitterClient.doTwitterRequest(TwitterClient.java:1175)
at com.plume.twitter.TwitterClient.getMentions(TwitterClient.java:803)
at com.levelup.socialapi.twitter.UpdateTwitterMentions$1.loadPage(UpdateTwitterMentions.java:21)
at com.levelup.socialapi.twitter.UpdateTwitterMentions$1.loadPage(UpdateTwitterMentions.java:18)
at com.levelup.socialapi.AbstractPageLoader.loadAllNeededPages(AbstractPageLoader.java:19)
at com.levelup.socialapi.twitter.UpdateThreadTwitter.runUpdate(UpdateThreadTwitter.java:59)
at com.levelup.socialapi.UpdateThread.call(UpdateThread.java:68)
at com.levelup.socialapi.UpdateThread.call(UpdateThread.java:10)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at co.tophe.async.AsyncTask.run(AsyncTask.java:116)
at com.levelup.socialapi.UpdateThreadFuture.run(UpdateThreadFuture.java:34)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.util.concurrent.TimeoutException
at com.koushikdutta.async.http.AsyncHttpClient$2.run(AsyncHttpClient.java:247)
at com.koushikdutta.async.AsyncServer.lockAndRunQueue(AsyncServer.java:708)
at com.koushikdutta.async.AsyncServer.runLoop(AsyncServer.java:725)
at com.koushikdutta.async.AsyncServer.run(AsyncServer.java:626)
at com.koushikdutta.async.AsyncServer.access$700(AsyncServer.java:41)
at com.koushikdutta.async.AsyncServer$13.run(AsyncServer.java:568)
It should always be called properly balanced, even if the thread exits with an exception
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)
Maybe needs a global public DownloadTaskFactory for that
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.