On Mon, 2023-03-06 at 16:26 +0530, sreenivas somavarapu wrote:
> Hi Team,
>
> We are using AbstractClassicEntityProducer with a customization of
> storing
> / computing contentLength as well which works fine if we have small
> POST
> data, but when POST data is big (for example 64 KB), it seems
> OutPutstream
> (internally using ContentOutputStream a wrapper over
> SharedOutputBuffer of
> initial size 1024) is not able to write data (We are using temporary
> buffer
> block of 4kb but still it is not able to write 4KB of data). Is there
> any
> limitation or some configuration problem?
>
> *Code being used*
> SharedOutputBuffer buffer = new SharedOutputBuffer(1024);
>
> produceData(contentType, new ContentOutputStream(buffer));
>
> protected void produceData(ContentType contentType, OutputStream
> outputStream) throws IOException {
> byte[] tmp = new byte[4 * 1024];
> int l = -1;
> while ((l = inputStream.read(tmp)) != -1) {
> * outputStream.write(tmp, 0, l); <---- This is where
> request
> hangs / waits*
This is likely due to a bug in your code that prevents the shared
buffer from being flushed.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]