|
|
|
@ -38,18 +38,21 @@ public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper
|
|
|
|
|
@Override
|
|
|
|
|
public ServletInputStream getInputStream() throws IOException
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
final ByteArrayInputStream bais = new ByteArrayInputStream(body);
|
|
|
|
|
|
|
|
|
|
return new ServletInputStream()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int read() throws IOException
|
|
|
|
|
{
|
|
|
|
|
return bais.read();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int available() throws IOException
|
|
|
|
|
{
|
|
|
|
|
return body.length;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public boolean isFinished()
|
|
|
|
|
{
|
|
|
|
@ -67,11 +70,6 @@ public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int available() throws IOException {
|
|
|
|
|
return body.length;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|