Apache proxy is modifying the HTTP status code
- by jarnbjo
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?