The current implementation asks the request for the content length and exits if the stream does not know the size (i.e. -1).
Within Bea portal this does not work because the action request always returns -1 for getContentLength.
However, if the portal does not impose an upload limit, this hsould be ok.
The problematic code snippet is
int requestSize = ctx.getContentLength();
if (requestSize == -1) {
throw new UnknownSizeException(
"the request was rejected because its size is unknown");
}
if (sizeMax >= 0 && requestSize > sizeMax) {
throw new SizeLimitExceededException(
"the request was rejected because its size (" + requestSize
+ ") exceeds the configured maximum (" + sizeMax + ")",
requestSize, sizeMax);
}
This should ne rewritten to
int requestSize = ctx.getContentLength();
if (sizeMax >= 0)
{
if (requestSize == -1) {
throw new UnknownSizeException(
"the request was rejected because its size is unknown");
}
if(requestSize > sizeMax) { throw new SizeLimitExceededException( "the request was rejected because its size (" + requestSize + ") exceeds the configured maximum (" + sizeMax + ")", requestSize, sizeMax); } }