My Oracle Support Banner

When Reading Post Data With request.getInputStream(), Using available() Is Not Proper Way To Allocate Buffer. (Doc ID 2537533.1)

Last updated on DECEMBER 15, 2023

Applies to:

Oracle WebLogic Server - Version 10.3.6 to 12.2.1.3.0
Information in this document applies to any platform.

Symptoms

When reading posted data with request.getInputStream() like following sample code,
It may miss to gain access to all of the stream buffer by repeatedly calling the method available().

having InputStream is = request.getInputStream();
Some cases, is.available() may return "0" before reading  the whole of stream data.

test.jsp

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.