Greg Ames wrote:
> We ought to be able to have our cake and eat it too.
What about this?
Index: modules/http/http_request.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/http/http_request.c,v
retrieving revision 1.148
diff -u -d -b -r1.148 http_request.c
--- modules/http/http_request.c 20 Jun 2002 19:34:28 -0000 1.148
+++ modules/http/http_request.c 20 Jun 2002 21:56:03 -0000
@@ -120,10 +120,12 @@
if (r->status != HTTP_OK) {
recursive_error = type;
+ if (!ap_status_drops_connection(type)) {
while (r->prev && (r->prev->status != HTTP_OK))
r = r->prev; /* Get back to original error */
type = r->status;
+ }
custom_response = NULL; /* Do NOT retry the custom thing! */
}
Actually, I think we can do better, but my dog needs to go outside soon. It
bothers me that this is changing/not changing the r that the rest of the
function uses depending on the status code. I think the main reason that it
looks for the original error is so that ap_send_error_resonse can report both
errors when there are recursive errors. We could use a different variable than
r here (so the original r never gets changed) and pass that to
ap_send_error_response, and also avoid whacking "type".
Greg