You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2002/11/04 15:50:17 UTC

DO NOT REPLY [Bug 14226] New: - BufferedMultipartInputStream constructor throw MaxLengthExceededException if -1 is used for the maxSize paramter

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14226>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14226

BufferedMultipartInputStream constructor throw MaxLengthExceededException if -1 is used for the maxSize paramter

           Summary: BufferedMultipartInputStream constructor throw
                    MaxLengthExceededException if -1 is used for the maxSize
                    paramter
           Product: Struts
           Version: 1.1 Beta 2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: File Upload
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: jeanchristophe.denis@free.fr


According to BufferedMultipartInputStream constructor's Javadoc :

* @param maxSize The maximum size in bytes that this multipart
*                request can be, or -1 for an unlimited length

since the constructor starts with :

this.inputStream = inputStream;
this.bufferSize = bufferSize;
this.contentLength = contentLength;
this.maxSize = maxSize;

if (maxSize < contentLength) {
    throw new MaxLengthExceededException(maxSize);
}

[...]

it seems that using -1 for maxSize throws unavoidably MaxLengthExceededException

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>