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=28085>. 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=28085 UnknownSizeException with IE5.0 (due to IE5.0 bug) Summary: UnknownSizeException with IE5.0 (due to IE5.0 bug) Product: Commons Version: 1.0 Final Platform: All OS/Version: Other Status: NEW Severity: Major Priority: Other Component: File Upload AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] When redirect is sent by application after POST of multipart/form-data form: HTTP/1.1 302 Moved Temporarily Location: http://karel:81/inzert/app?service=page/BulletinOrders Content-Type: text/plain Content-Length: 0 Date: Wed, 31 Mar 2004 08:37:38 GMT Server: Apache Coyote/1.0 IE5.0 sends invalid header Content-type with its GET request: GET /inzert/app?service=page/BulletinOrders HTTP/1.1 Content-Type: multipart/form-data; boundary=--------------------------- 7d43892c1c010e User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0) Host: karel:81 Connection: Keep-Alive Cache-Control: no-cache Which will cause org.apache.commons.fileupload.FileUploadBase$UnknownSizeException. Solution: FileUploadBase.isMultipartContent(HttpServletRequest req) should ensure that the request method was POST and not only see the Content-type header: public static final boolean isMultipartContent(HttpServletRequest req) { String contentType = req.getHeader(CONTENT_TYPE); if (contentType == null) { return false; } if (contentType.startsWith(MULTIPART) && "POST".equals(req.getMethod ().toUpperCase())) { return true; } return false; } Regars, Karel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
