Bug 35942 - NPE when calling ServletRequest#getAttribute("javax.servlet.request.cipher_suite")
NPE when calling ServletRequest#getAttribute("javax.servlet.request.cipher_su...
Status: RESOLVED FIXED
Product: Tomcat 5
Classification: Unclassified
Component: Connector:AJP
5.5.10
Other other
: P2 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2005-07-30 18:26 UTC by Markus Schönhaber
Modified: 2005-07-30 15:20 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Schönhaber 2005-07-30 18:26:37 UTC
When using AJP and APR, a NPE occurs in 
ServletRequest#getAttribute("javax.servlet.request.cipher_suite");
When accessing the bundeled example-servlet
/servlets-examples/servlet/RequestInfoExample
this can be observed.

The statcktrace:

java.lang.NullPointerException
        at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:109)
        at org.apache.coyote.ajp.AjpAprProcessor.action(AjpAprProcessor.java:651)
        at org.apache.coyote.Request.action(Request.java:365)
        at org.apache.catalina.connector.Request.getAttribute(Request.java:847)
        at
org.apache.catalina.connector.RequestFacade.getAttribute(RequestFacade.java:260)
        at RequestInfoExample.doGet(RequestInfoExample.java:89)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at filters.ExampleFilter.doFilter(ExampleFilter.java:101)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:495)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:513)
        at
org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:588)
        at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1182)
        at java.lang.Thread.run(Thread.java:595)

I've verified this on a stock Tomcat 5.5.10 binary distribution connected to an
Apache httpd 2.0.54 using JK-1.2.14.

If APR is not used, no Exception is thrown.