commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Earl Hood <e...@earlhood.com>
Subject Fixes for FileUploadBase.java
Date Tue, 23 Mar 2004 19:23:28 GMT
Attached is a patch to FileUploadBase.java that fixes a couple of bugs:

1. Handle correctly a boundary parameter value surrounded by quotes.

2. Case-insensitive matching of content-type values and parameter names.
   For example, MULTIPART/FORM-DATA and multipart/form-data are the
   same thing.

I was going to do charset stuff, but noticed that the latest CVS version
does handle this now, so the patch provided is against a recent nightly
build.

There is a change where some stricter formating is enforced.  For example,
if a part does not define a content-disposition, and exception is thrown.
There is a comment asking if this is desired.  It is not clear from
looking at the code and conformant a post should be.  IMO, it should
be, or, conformance should be configurable.  Malformed data can
indicate application errors (and possible security issues), so quietly
ignoring errors should probably be avoided.

=====


Mime
View raw message