You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/06/05 03:46:20 UTC
DO NOT REPLY [Bug 20491] New: -
Connection: Close header ignored
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=20491>.
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=20491
Connection: Close header ignored
Summary: Connection: Close header ignored
Product: Tomcat 4
Version: 4.1.24
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: jcourtney@inphonic.com
Referencing this copy of the HTTP 1.1 specification
http://www.zvon.org/tmRFC/RFC2616/Output/index.html
Per sections 8.1.2.1 and 14.10 any client not supporting persistent HTTP
connections should send a "Connection: close" header.
Per section 4.2 header field names are case-insensitive but header field values
are not specified. It may therefore be assumed that the intent is to support
case-sensitive header field values at the discretion of the implementing
application.
We've found a product (formerly Cisco uOne) which implements an HTTP client
which uses the slightly incorrect syntax of "Connection: Close" (note the upper
case 'C'). While this does not quite comply with the HTTP 1.1 spec which
refers to use of the string "close" only the HTTP 1.1 spec never makes mention
of requiring that "close" be lower case. Clearly the use of "Close" is a poor
implementation but it would seem that Tomcat 4.1 is unnecessarily picky here.
Per section 19.3 it is recommended that applications be "tolerant of deviations
whenever those deviations can be interpreted unambiguously". I think that
applies in this case and thus I suggest making Tomcat 4.x tolerant of the HTTP
header "Connection: Close".
Below is a patch for jakarta-tomcat-
4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java.
It may not be the ideal way to implement the fix as perhaps adding alternative
case-insensitive comparison methods to the HttpHeader class would be more
elegant.
RCS file: /home/cvspublic/jakarta-tomcat-
4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
retrieving revision 1.46
diff -r1.46 HttpProcessor.java
680,681c680,681
< if (header.valueEquals
< (DefaultHeaders.CONNECTION_CLOSE_VALUE)) {
---
> if (value.equalsIgnoreCase(
> new String(DefaultHeaders.CONNECTION_CLOSE_VALUE))) {
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org