commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Belot Thomas" <Thomas.Be...@atosorigin.com>
Subject [FileUpload] Exception during request parsing
Date Thu, 17 Nov 2005 12:30:34 GMT
Hello everybody, i've got an exception while using :
	DiskFileUpload upload = new DiskFileUpload();
	upload.setSizeMax(getMaxFormSize());
	List items = upload.parseRequest(request);

Exception (fileUpload v1.0):
org.apache.commons.fileupload.FileUploadException: Processing of
multipart/form-data request failed. null
        at
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase
.java:429)
	  ....

I went into the nightly build code source of FileUploadBase and I'm
wondering a few things :
1) Why don't fileupload chain exceptions instead of using sub
exception's message (which brings the useless null in the log)?
	  catch (IOException e)
        {
            throw new FileUploadException(
                "Processing of " + MULTIPART_FORM_DATA
                    + " request failed. " + e.getMessage());
        }
2) Why don't fileupload close the request InputStream ?
	InputStream input = req.getInputStream();



Thanks for your attention


Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message