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(
                        at com.caucho.server.dispatch.ServletFilterChain.doFilter(
                        at com.caucho.server.webapp.DispatchFilterChain.doFilter(
                        at com.caucho.server.dispatch.ServletInvocation.service(
                        at com.caucho.server.webapp.RequestDispatcherImpl.forward(
                        at com.caucho.server.webapp.RequestDispatcherImpl.dispatch(
                        at com.caucho.server.dispatch.RewriteDispatchFilterChain.doFilter(
                        at com.caucho.server.cache.ProxyCacheFilterChain.doRequestCacheable(
                        at com.caucho.server.cache.ProxyCacheFilterChain.doFilter(
                        at com.caucho.server.webapp.WebAppFilterChain.doFilter(
                        at com.caucho.server.webapp.AccessLogFilterChain.doFilter(
                        at com.caucho.server.dispatch.ServletInvocation.service(
                        at com.caucho.server.http.HttpRequest.handleRequest(
                        at com.caucho.env.thread.ResinThread.runTasks(
                       Caused by: java.lang.IllegalStateException: getOutputStream() can't be called after getWriter().
                        at com.caucho.server.http.HttpServletResponseImpl.getOutputStream(
                        at com.caucho.server.http.CauchoResponseWrapper.getOutputStream(
                        at com.caucho.servlets.CGIServlet.service(
                        ... 23 more
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
06-19-12 10:43


- 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