You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Justin Erenkrantz <ju...@erenkrantz.com> on 2004/08/01 19:24:18 UTC

[PATCH] mod_cache fixes: #1

--On Sunday, August 1, 2004 11:25 AM -0400 Bill Stoddard <bi...@wstoddard.com> 
wrote:

> Too many changes in one patch. Break this up into multiple consumable in 15
> minute patches and I'll review them.

* modules/http/http_request.c (ap_internal_redirect): Call quick_handler when
  we do an internal redirect to allow caching.  This allows mod_dir requests
  to be cached.

Index: modules/http/http_request.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/http/http_request.c,v
retrieving revision 1.164
diff -u -r1.164 http_request.c
--- modules/http/http_request.c	9 Feb 2004 20:29:20 -0000	1.164
+++ modules/http/http_request.c	1 Aug 2004 08:24:53 -0000
@@ -455,16 +455,19 @@
         return;
     }

-    access_status = ap_process_request_internal(new);
-    if (access_status == OK) {
-        if ((access_status = ap_invoke_handler(new)) != 0) {
+    access_status = ap_run_quick_handler(new, 0);  /* Not a look-up request */
+    if (access_status == DECLINED) {
+        access_status = ap_process_request_internal(new);
+        if (access_status == OK) {
+            if ((access_status = ap_invoke_handler(new)) != 0) {
+                ap_die(access_status, new);
+                return;
+            }
+            ap_finalize_request_protocol(new);
+        }
+        else {
             ap_die(access_status, new);
-            return;
         }
-        ap_finalize_request_protocol(new);
-    }
-    else {
-        ap_die(access_status, new);
     }
 }



Re: [PATCH] mod_cache fixes: #1

Posted by Bill Stoddard <bi...@wstoddard.com>.
Justin Erenkrantz wrote:
> --On Sunday, August 1, 2004 11:25 AM -0400 Bill Stoddard 
> <bi...@wstoddard.com> wrote:
> 
>> Too many changes in one patch. Break this up into multiple consumable 
>> in 15
>> minute patches and I'll review them.
> 
> 
> * modules/http/http_request.c (ap_internal_redirect): Call quick_handler 
> when
>  we do an internal redirect to allow caching.  This allows mod_dir requests
>  to be cached.

I think you need to call ap_finalize_request_protocol if quick_handler returns OK.

Bill