https://issues.apache.org/bugzilla/show_bug.cgi?id=50694

           Summary: ModJK NSAPI inserted headers case sensitivity issue
           Product: Tomcat Connectors
           Version: unspecified
          Platform: Other
        OS/Version: Mac OS X 10.3
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Common
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: deltaw...@gmail.com


Scenario: SunONE Webserver with MODJK NSAPI plugin on Solaris10,
reverse-proxied to by Varnish proxy on same server.

Description of issue: A request comes into the webserver and is passed back to
a JBoss server via the MODJK plugin, when the response comes back, the MODJK
plugin inserts a Content-Length header using mixed-case ie: Content-Length:
<length> (as defined in /native/common/jk_ajp_common.c), this is ignored by the
webserver core as it’s expecting inserted headers to be all lower-case
(mentioned here:
http://wikis.sun.com/pages/viewpage.action?pageId=58042468#P%26R-%7B%7Bpblocknninsert%28%29%7D%7DFunction
see "Parameter names are case sensitive. By convention, lowercase names are
used for parameters that correspond to HTTP header fields.") and it duly
inserts its own “Transfer-encoding: chunked” header, leading to Varnish being
presented with a response containing both “Content-Length: <len>”  and
“Transfer-encoding: chunked” which breaks Varnish.

Changing the constants below to lower case resolved our issue (Section from
/native/common/jk_ajp_common.c showing mixed-case header constants:)

const char *response_trans_headers[] = {
    "Content-Type",
    "Content-Language",
    "Content-Length",
    "Date",
    "Last-Modified",
    "Location",
    "Set-Cookie",
    "Set-Cookie2",
    "Servlet-Engine",
    "Status",
    "WWW-Authenticate"
};

This change may well break plugins for the other webservers of course so I'm
requesting that this fix be investigated and if verified, incorporated into
ModJk builds for iPlanet going forward.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to