commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38936] New: - FileUploadBase::parseRequest has to be more tolerant of errors
Date Sun, 12 Mar 2006 02:29:15 GMT
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=38936>.
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=38936

           Summary: FileUploadBase::parseRequest has to be more tolerant of
                    errors
           Product: Commons
           Version: 1.1.0
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: File Upload
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: kenkyee@excite.com


I found a bad multipart upload client (I know, it's flaky and it should be
fixed), but the FileUpload should be more tolerant of errors.  In particular, I
found that the http post was badly formatted:
--7d237d5a03c6
Content-Disposition: form-data; name="ekclientname"

ekmediatransfer
--7d237d5a03c6
Content-Disposition: form-data; name="ekclientversion"

1.0
--7d237d5a03c6
Upload File
--7d237d5a03c6--

Note that the last segment is badly formatted...invalidly formatted header,
missing CRLF, etc.

I modified parseRequest to do this when catching the IOException:
            if (items.size() > 0) {
                //TODO: log error somewhere so programs can check for it
                // return parsed items if there were any
                return items;
            } else {
            throw new FileUploadException(
                "Processing of " + MULTIPART_FORM_DATA
                    + " request failed. " + e.getMessage());
            }

Basically, I want it to give me all the parts it could decode while also
flagging an error that the upload client is buggy/flaky.  Unfortunately, there
doesn't seem to be a way to flag the error and if you throw a
FileUploadException, you can't pass the decoded parts back :-(

-- 
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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message