DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9526>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9526 HttpServletRequest.getHeader(String) yields inconsistent results depending on how the request header was provided to tomcat Summary: HttpServletRequest.getHeader(String) yields inconsistent results depending on how the request header was provided to tomcat Product: Tomcat 4 Version: Nightly Build Platform: All OS/Version: All Status: NEW Severity: Major Priority: Other Component: Catalina AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The javadocs for HttpServletRequest.getHeaders(String name) states that this method will yield an enumeration of all values associated with the specified header. However, the result will yield unexpected results if the header is presented in a certain fashion. For example, take the following: ------------------------------------------------ GET /test.jsp HTTP/1.0 header1: val1 header1: val2 HTTP/1.1 200 OK Content-Type: text/html;ISO-8859-1 Set-Cookie: JSESSIONID=5952D8602392F093E5203582AACC4A65; Path=/ Date: Thu, 30 May 2002 18:50:14 GMT Server: Apache Coyote HTTP/1.1 Connector [1.0] Connection: close val1 val2 -------------------------------------------------------- Now consider the same request, except in this case, instead of sending two request headers, the values are aggregated into a comma-separated list of values: -------------------------------------------------------------- Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET /test.jsp HTTP/1.0 header1: val1, val2 HTTP/1.1 200 OK Content-Type: text/html;ISO-8859-1 Set-Cookie: JSESSIONID=94E82F0181EE1001D109531544CAE960; Path=/ Date: Thu, 30 May 2002 18:55:36 GMT Server: Apache Coyote HTTP/1.1 Connector [1.0] Connection: close val1, val2 Connection closed by foreign host. ------------------------------------------------------------------- In the above case, the call to getHeaders() is returning the list of values as a single enumerated entity. This seems to go against what is described in the javadocs. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>