Bug 59210 - Server push example failed in tomcat 8.5.0
Summary: Server push example failed in tomcat 8.5.0
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.0.x-trunk
Hardware: PC Mac OS X 10.1
: P2 normal (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-22 06:40 UTC by Huxing Zhang
Modified: 2016-03-22 10:34 UTC (History)
0 users



Attachments
Fix simple image push example failure (1.03 KB, patch)
2016-03-22 06:43 UTC, Huxing Zhang
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Huxing Zhang 2016-03-22 06:40:11 UTC
Steps to reproduce:
1. download tomcat 8.5.0
2. configure a HTTP/2 supported connector over TLS
3. start tomcat
4. visit https://localhost:8443/examples/servlets/serverpush/simpleimage

Observations:

HTTP Status 500 - org.apache.catalina.connector.RequestFacade cannot be cast to org.apache.catalina.connector.Request

type Exception report

message org.apache.catalina.connector.RequestFacade cannot be cast to org.apache.catalina.connector.Request

description The server encountered an internal error that prevented it from fulfilling this request.

exception

java.lang.ClassCastException: org.apache.catalina.connector.RequestFacade cannot be cast to org.apache.catalina.connector.Request
	http2.SimpleImagePush.doGet(SimpleImagePush.java:38)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
note The full stack trace of the root cause is available in the Apache Tomcat/8.5.0 logs.

Apache Tomcat/8.5.0
Comment 1 Huxing Zhang 2016-03-22 06:43:56 UTC
Created attachment 33688 [details]
Fix simple image push example failure
Comment 2 Violeta Georgieva 2016-03-22 10:34:31 UTC
Hi,

Thanks for the report and the patch.
Fix will be available from 8.5.1 onwards.

Regards,
Violeta