I wrote a moderately complex server about 18 months ago based on Restlet 2.0
that has been happily serving data since then. I've recently needed to add
some new features, and I'm running in to a problem with the new code. I've
updated to Restlet 2.0.8 as well. For all requests to my new code from an
android client, on the server (and after my code completes OK) I'm getting:
[07/28 17:25:09.009] I [LogFilter.afterHandle] 2011-07-28 17:25:09
xx.xxx.xxx.xxx - xxx.xxx.xxx.xx 8080POST/path/to/restlet -
200 211725 35 1776
http://xxx.xxx.xxx.xx:8080 Restlet-Framework/2.0.8 -
[07/28 17:25:10.010] I [ServerAdapter.commit] The connection was broken. It was
probably closed by the client.
[07/28 17:25:10.010] F1 [JettyCall.complete] Unable to flush the response
[07/28 17:25:10.010] F1 [JettyCall.complete] Unable to complete the response
Requests to the older code still work fine (I don't think there's a distinction
between the old and new code though).
On the client, I sometimes get a partial response (some of the XML that is
being returned shows up, but not the complete xml document) and sometimes get a
socket closed exception. If I use a j2se client that I wrote to test the
server, I get the entire response with no problems, so it seems like there
could be something going on with the android client. I've tried using both the
net and http clients, both seem to give the same problem. The XML being
returned is about 200kb, but I've pulled bigger requests than that over
restlet, so I'd be surprised if it's the amount of data.
Elsewhere in the discussion group someone said that they got this error
occasionally, and the response was that it would occur when there was an error,
which doesn't really help. Any ideas what could be going wrong?
Thanks
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2805453