]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
When doing a subrequest lookup, do not lookup using the quickhandler if
authorColm MacCarthaigh <colm@apache.org>
Tue, 27 Sep 2005 11:52:14 +0000 (11:52 +0000)
committerColm MacCarthaigh <colm@apache.org>
Tue, 27 Sep 2005 11:52:14 +0000 (11:52 +0000)
next_filter is NULL, since this implies that the subrequest will be
internal_fast_redirect'ed or will never be called. See line request.c:1513
onwards (in make_sub_request) also.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@291914 13f79535-47bb-0310-9956-ffa450edef68

server/request.c

index 056ccb04bb19d4207b342b4465bcb5ba2721f096..99db3b32639e0426160cf443f151664b764c88b0 100644 (file)
@@ -1609,10 +1609,18 @@ AP_DECLARE(request_rec *) ap_sub_req_method_uri(const char *method,
     /* lookup_uri 
      * If the content can be served by the quick_handler, we can
      * safely bypass request_internal processing.
+     *
+     * If next_filter is NULL we are expecting to be 
+     * internal_fast_redirect'ed to the subrequest, or the subrequest will 
+     * never be invoked. We need to make sure that the quickhandler is not 
+     * invoked by any lookups. Since an internal_fast_redirect will always 
+     * occur too late for the quickhandler to handle the request.
      */
-    res = ap_run_quick_handler(rnew, 1);
+    if (next_filter) {
+        res = ap_run_quick_handler(rnew, 1);
+    }
 
-    if (res != OK) {
+    if (next_filter == NULL || res != OK) {
         if ((res = ap_process_request_internal(rnew))) {
             rnew->status = res;
         }