Apache httpd は mod_proxy を使用するとカスタムステータスコードではなく 500 ステータスコードを返す
Issue
- Tomcat または JBoss のロードバランサーとして Apache 2.2. mod_proxy を使用していますが、Tomcat または JBoss のカスタム応答コードが 500 に再マップされます。
-
JSPに apache httpd (mod_proxy を使用) 経由でアクセスすると、ステータスコードが err 500 に変更されます。たとえば、コマンド
curl -i http://localhost:8080/test/apacheTest.jsp
を実行すると、ステータスコードはHTTP/1.1 230 230
として表示されます。 しかし、Apache httpd で表示すると、ステータスコードはHTTP/1.1 500 Internal Server Error
に変更されます。 -
JSP ページには以下が含まれます。
<%@ 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.