Anonymous | Login | Signup for a new account | 12-17-2024 08:40 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0001075 | [Resin] | major | always | 04-26-06 05:00 | 06-28-06 12:03 | ||||
Reporter | rudy | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.0.18 | ||||||
Summary | 0001075: SSI - error handling and mod_caucho | ||||||||
Description |
We want to conditionally hide all errors coming back from resin. The desired behaviour is that errors for components (ie: SSI includes) are simply removed, and that errors in top-level pages are replaced with a custom error page defined in the Apache configuration. This works fine in our existing architecture (with an analogous backend server and Apache module) by using the SSIErrorMsg directive for includes, and the ErrorDocument directive for top-level pages. However when using Resin's supplied Apache2 module, mod_caucho returns OK for every result of a request except a 503. This indicates to Apache and other modules, such as mod_ssi, that it considers the page/component to have generated succesfully. Hence, the error directives mentioned previously are never called. The value of the status on the request struct isn't considered for this, only the returned value. In particular at the end of thte 'caucho_request' function, replacing the lines else if (r->status == HTTP_SERVICE_UNAVAILABLE) return HTTP_SERVICE_UNAVAILABLE; else return OK; with } else if (r->status == HTTP_OK) { return OK; } else { // Error occured st = r->status; r->status = HTTP_OK; return st; } results in mod_ssi behaving as expected. The status on the request structure needs to be set to HTTP_OK (200), as otherwise Apache will think an internal error has occurred. Apache will set r->status to the returned error code by itself at the appropriate time. |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
There are no notes attached to this issue. |
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed. 25 unique queries executed. |