I tried to receive/handle a POST request via
HttpService.doService (extending the "GET" of the
ElementalHttpServer example) which lead me to the following bug:
Exception in thread "Thread-12" java.lang.IllegalStateException: Content has
been consumed
at
org.apache.http.entity.BasicHttpEntity.getContent(BasicHttpEntity.java:82)
at
org.apache.http.protocol.HttpService.handleRequest(HttpService.java:126)
at
at.oesoft.ezes.web.HttpServiceMasterJak.run(HttpServiceMasterJak.java:77)
at java.lang.Thread.run(Thread.java:595)
In HttpService (line 125 and 126) the entity.getContent() is
called twice:
if (request instanceof HttpEntityEnclosingRequest) {
// Make sure the request content is fully consumed
HttpEntity entity = ((HttpEntityEnclosingRequest)request).getEntity();
if (entity != null && entity.getContent() != null) {
entity.getContent().close();
}
}
but in BasicHttpEntity an exception is thrown, if the
getContent() method is called more than once ;-)
good luck
gerhard
--
.''`. gerhard oettl on Debian/Gnu Linux
: :' :
`. `'` gpg key: 1024D/D59131AA 2002-06-18
`-
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]