myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (TOMAHAWK-1381) HtmlInputFileUpload does not fail gracefully when filesize exceeds uploadMaxFileSize web.xml value
Date Thu, 04 Jun 2009 03:20:07 GMT

    [ https://issues.apache.org/jira/browse/TOMAHAWK-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716141#action_12716141
] 

Leonardo Uribe commented on TOMAHAWK-1381:
------------------------------------------

Updated patch. To solve this point:

- MultipartRequestWrapper calls FileUploads setSizeMax, this is the size for the total upload,
and not individual files, it should call setFileSizeMax 

It was created a param called uploadMaxSize that it is tied to FileUpload.setSizeMax, so uploadMaxFileSize
is tied to FileUpload.setFileSizeMax. If uploadMaxSize(or org.apache.myfaces.UPLOAD_MAX_SIZE
in TomahawkFacesContextWrapper case) is not set, the default value is the value initialized
on uploadMaxFileSize.



> HtmlInputFileUpload does not fail gracefully when filesize exceeds uploadMaxFileSize
web.xml value
> --------------------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1381
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1381
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: File Upload
>    Affects Versions: 1.1.7, 1.1.8
>            Reporter: Phillip Webb
>         Attachments: file-upload.patch, file-upload2.patch, TOMAHAWK-1381-fileupload3.patch,
TOMAHAWK-1381-fileupload4.patch
>
>
> When uploading a file using the HtmlInputFileUpload that exceeds that uploadMaxFileSize
web.xml setting the system fails without error and no form data is not processed by JSF.
> I think that there are a number of reasons for this:
> - There is a bug in commons-fileupload that prevents failures from being handled correctly
(see FILEUPLOAD-169)
> - MultipartRequestWrapper calls FileUploads setSizeMax, this is the size for the total
upload, and not individual files, it should call setFileSizeMax
> - HtmlFileUploadRenderer calls fileUpload.parseRequest(request), this will fail if any
size exceptions are thrown, it would be better to use fileUpload.getItemIterator and catch
each exception.

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


Mime
View raw message