Apache httpd returns 500 status code instead of custom status code when using mod_proxy
Issue
- We using Apache 2.2. mod_proxy as a load-balancer for a Tomcat or JBoss custom response codes are remapped to 500.
-
When the JSP is accessed through apache httpd (using mod_proxy), the status code is changed to err 500. For instance if I run the command
curl –i http://localhost:8080/test/apacheTest.jsp
the status code is seen asHTTP/1.1 230 230
. But when viewed through apache httpd that status code is changed toHTTP/1.1 500 Internal Server Error
-
The JSP page contains
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> <%response.setStatus(230);%> </body> </html>
Environment
-
Red Hat JBoss Enterprise Web Server (EWS)
- 1.0.2 - httpd 2.2.17
- 1.0.1 - httpd 2.2.14
-
Red Hat Enterprise Linux (RHEL)
- httpd 2.2.3
- httpd 2.2.15
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.