Apache proxy is modifying the HTTP status code
Posted
by
jarnbjo
on Server Fault
See other posts from Server Fault
or by jarnbjo
Published on 2011-11-11T16:30:32Z
Indexed on
2011/11/13
9:55 UTC
Read the original article
Hit count: 404
I am using Apache as a proxy frontend for a Java web application, which is deployed on WebSphere. The web application is using custom status codes (55x) to signal specific errors to the clients. When accessing the web application directly through the WebSphere HTTP listener, everything works as expected, but when these requests are proxied through an Apache load balancer, the status codes are modified by Apache and replaced with a generic 500 error code (internal server error).
In Apache's access.log, the correct status code is logged:
<IP> - - [11/Nov/2011:17:24:53 +0100] "POST <URL> HTTP/1.1" 551 36
But the actual response received by the client starts like this (logged with tcpdump):
HTTP/1.1 500 Internal Server Error
...
Followed by the real status code in the response content:
... Error 551: Berichteter Fehler: 551 ...
Is there an obvious reason for this behaviour or does someone have a suggestion on how to modify the Apache configuration to forward the "real" status code instead of 500?
© Server Fault or respective owner