458527 - Implement an async proxy servlet that can perform content transformations.
Handle jetty-9.3 isReady at EOF behaviour
This commit is contained in:
parent
5e95caaf29
commit
2563ef6871
|
@ -226,14 +226,18 @@ public class AsyncMiddleManServlet extends AbstractProxyServlet
|
|||
while (input.isReady() && !input.isFinished())
|
||||
{
|
||||
int read = readClientRequestContent(input, buffer);
|
||||
|
||||
if (_log.isDebugEnabled())
|
||||
_log.debug("{} asynchronous read {} bytes on {}", getRequestId(clientRequest), read, input);
|
||||
|
||||
if (read<0)
|
||||
return Action.SUCCEEDED;
|
||||
|
||||
if (contentLength > 0 && read > 0)
|
||||
length += read;
|
||||
|
||||
ByteBuffer content = read > 0 ? ByteBuffer.wrap(buffer, 0, read) : BufferUtil.EMPTY_BUFFER;
|
||||
boolean finished = read < 0 || length == contentLength;
|
||||
boolean finished = length == contentLength;
|
||||
process(content, this, finished);
|
||||
|
||||
if (read > 0)
|
||||
|
|
Loading…
Reference in New Issue