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

http://issues.apache.org/bugzilla/show_bug.cgi?id=36687





------- Additional Comments From [EMAIL PROTECTED]  2006-03-15 16:21 -------
(In reply to comment #6)
> Is it possible to move the checking of the file size down to Commons Validator
> with a "fileSize" validation?

The problem is that commons-fileupload throws an exception as soon as it detects
that the maximum file size has been transcended.  This all happens before
validator is invoked (and besides, validator has no dependencies upon any API
that would let it know the file size).

The changes to which Martin alludes are that immediately upon hitting the
maximum file size limit, commons-fileupload gives up any request processing,
leaving the whole thing in an unpredictable state.  For this reason, Struts
should probably throw an exception, as Niall suggested.  Users could apply local
or global exception handlers to deal with it.   

Niall, do you dismiss throwing an exception even in Struts 1.2.x for
compatibility reasons?  Or just to maintain focus on the head of development?

If commons-fileupload were changed to not throw an exception, or to attempt to
soldier through and finish processing the request with only file parameters
having null values when the file size limit were transcended, then Struts might
not throw an exception.  Offhand, it seems like a decent enhancement request for
commons-fileupload, but of course, that should be separated from this ticket.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to