Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0 Final
-
None
-
None
-
Operating System: other
Platform: All
-
28085
Description
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)
if (contentType.startsWith(MULTIPART) && "POST".equals(req.getMethod
().toUpperCase()))
return false;
}
Regars,
Karel