Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004953 [Resin] minor always 02-03-12 13:27 06-19-12 10:43
Reporter cowan View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.29 Product Version 4.0.25
  Product Build
Summary 0004953: CGIServlet error handling
Description When CGIServlet parses headers set by the script, and finds an error code, it immediately writes a custom error page to the response. This causes 2 problems:

1. The CGI (ex wordpress with cgi-php) writes it's own informational 500 error page, which does not get displayed at all.
2. HTTPServletResponseImpl.sendError opens a response writer, then CGIServlet attempts to open a reponse outputstream, resulting in the error below:

[12-02-03 16:18:31.098] {http://*:8080-16} [^] javax.servlet.ServletException: java.lang.IllegalStateException: getOutputStream() can't be called after getWriter().
                        at com.caucho.servlets.CGIServlet.service(CGIServlet.java:304)
                        at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:109)
                        at com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:126)
                        at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:289)
                        at com.caucho.server.webapp.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:298)
                        at com.caucho.server.webapp.RequestDispatcherImpl.dispatch(RequestDispatcherImpl.java:141)
                        at com.caucho.server.dispatch.RewriteDispatchFilterChain.doFilter(RewriteDispatchFilterChain.java:91)
                        at com.caucho.server.cache.ProxyCacheFilterChain.doRequestCacheable(ProxyCacheFilterChain.java:250)
                        at com.caucho.server.cache.ProxyCacheFilterChain.doFilter(ProxyCacheFilterChain.java:191)
                        at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:156)
                        at com.caucho.server.webapp.AccessLogFilterChain.doFilter(AccessLogFilterChain.java:95)
                        at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:289)
                        at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:811)
                        at com.caucho.network.listen.TcpSocketLink.dispatchRequest(TcpSocketLink.java:1221)
                        at com.caucho.network.listen.TcpSocketLink.handleRequest(TcpSocketLink.java:1177)
                        at com.caucho.network.listen.TcpSocketLink.handleRequestsImpl(TcpSocketLink.java:1161)
                        at com.caucho.network.listen.TcpSocketLink.handleRequests(TcpSocketLink.java:1084)
                        at com.caucho.network.listen.TcpSocketLink.handleAcceptTask(TcpSocketLink.java:907)
                        at com.caucho.network.listen.AcceptTask.doTask(AcceptTask.java:74)
                        at com.caucho.network.listen.ConnectionTask.runThread(ConnectionTask.java:97)
                        at com.caucho.network.listen.ConnectionTask.run(ConnectionTask.java:80)
                        at com.caucho.network.listen.AcceptTask.run(AcceptTask.java:59)
                        at com.caucho.env.thread.ResinThread.runTasks(ResinThread.java:164)
                        at com.caucho.env.thread.ResinThread.run(ResinThread.java:130)
                       Caused by: java.lang.IllegalStateException: getOutputStream() can't be called after getWriter().
                        at com.caucho.server.http.HttpServletResponseImpl.getOutputStream(HttpServletResponseImpl.java:139)
                        at com.caucho.server.http.CauchoResponseWrapper.getOutputStream(CauchoResponseWrapper.java:120)
                        at com.caucho.servlets.CGIServlet.service(CGIServlet.java:249)
                        ... 23 more
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0005882)
ferg
06-19-12 10:43

server/1990
 

- Issue History
Date Modified Username Field Change
02-03-12 13:27 cowan New Issue
06-19-12 10:43 ferg Note Added: 0005882
06-19-12 10:43 ferg Assigned To  => ferg
06-19-12 10:43 ferg Status new => closed
06-19-12 10:43 ferg Resolution open => fixed
06-19-12 10:43 ferg Fixed in Version  => 4.0.29


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker