Mantis - Resin
Viewing Issue Advanced Details
5018 minor always 04-02-12 23:11 04-04-12 16:15
ralscha  
alex  
normal  
closed 4.0.27  
fixed  
none    
none 4.0.28  
0005018: Part.getHeader method not case insensitive
According to javadoc
(http://download.oracle.com/otndocs/jcp/servlet-3.0-fr-oth-JSpec/) [^] the
parameter from the javax.servlet.http.Part.getHeader(..) method should be case
insensitive. Tomcat 7.0.26 handles this correctly, but Resin does not.

"Returns the value of the specified mime header as a String. If the Part did
not include a header of the specified name, this method returns null. If there
are multiple headers with the same name, this method returns the first header
in the part. The header name is case insensitive. You can use this method with
any request header."

The browser sends: Content-Disposition
Resin stores it lowercase: content-disposition

Resin only returns the header with
  part.getHeader("content-disposition")
With
  part.getHeader("Content-Disposition")
it returns nothing.

There is a github project that demonstrates the problem
https://github.com/ralscha/uploadproblem [^]

Notes
(0005734)
alex   
04-04-12 16:15   
server/1652