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=29214>.
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=29214

response containsHeader("Content-Type") not working

           Summary: response containsHeader("Content-Type") not working
           Product: Tomcat 4
           Version: 4.1.24
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Servlet & JSP API
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


response.containsHeader("Content-Type") always returns false even if the header
is explicitly added via response.setHeader("Content-Type", "text/html").

To reproduce, simply add the following to a filter or servlet:

response.setHeader("Content-Type", "text/html");
System.out.println(response.containsHeader("Content-Type"));

The difficult question (for which the Servlet spec is silent) will be what to
return for response.containsHeader("Content-Type") if the header was set using
the response.setContentType() method.  I think the spec is pretty clear that if
setHeader is used, containsHeader should work for any header.

Thanks... Sean

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to