myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] Commented: (TOMAHAWK-1521) ExtensionsFilter cacheFileSizeErrors Does Not Work As Advertised
Date Tue, 15 Jun 2010 20:35:26 GMT


Leonardo Uribe commented on TOMAHAWK-1521:

If you are using Extensions filter check this two params:

> ExtensionsFilter cacheFileSizeErrors Does Not Work As Advertised
> ----------------------------------------------------------------
>                 Key: TOMAHAWK-1521
>                 URL:
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: File Upload
>    Affects Versions: 1.1.9
>         Environment: commons-fileupload-1.2.1
>            Reporter: JZ
> With the extensions filter configured with cacheFileSizeErrors=true and  uploadMaxFileSize=1M,
I get the stacktrace below when uploading a file larger than 1M.
> This is NOT the expected stack trace.
> Note that ServletChacheFileSizeErrorsFileUpload is used.
> However, line 108 in that class has a comment which states that the line "throws a SizeLimitExceededException
(wrapped by a FileUploadIOException) if the request is longer than the max size"
> That is not accurrate.  The SizeLimitExceededException is NOT, in fact, wrapped.
> As a result, ServletChacheFileSizeErrorsFileUpload does not trap exceptions at the right
level and the SizeLimitExceededException bubbles up to the MultipartRequestWrapper (which
is the source of the WARN - level stack trace below).
> Basically, this behaviour renders the cacheFileSizeErrors property useless.
> Here's the stacktrace:
> 2010-06-15 15:07:57,234 WARN  org.apache.myfaces.webapp.filter.MultipartRequestWrapper]
- <SizeLimitExceededException while uploading file.> []
> org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request
was rejected because its size (3506126) exceeds the configured maximum (1048576)
> 	at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(
> 	at org.apache.commons.fileupload.FileUploadBase.getItemIterator(
> 	at org.apache.myfaces.webapp.filter.servlet.ServletChacheFileSizeErrorsFileUpload.parseRequestCatchingFileSizeErrors(
> 	at org.apache.myfaces.webapp.filter.MultipartRequestWrapper.parseRequest(
> 	at org.apache.myfaces.webapp.filter.MultipartRequestWrapper.getParameter(
> 	at javax.servlet.ServletRequestWrapper.getParameter(

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message