From: Colm MacCarthaigh Date: Tue, 27 Sep 2005 11:52:14 +0000 (+0000) Subject: When doing a subrequest lookup, do not lookup using the quickhandler if X-Git-Tag: 2.3.0~2936 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2bcdddae08ca32c79f502d40ef87ed07e5e81ae;p=thirdparty%2Fapache%2Fhttpd.git When doing a subrequest lookup, do not lookup using the quickhandler if 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 --- diff --git a/server/request.c b/server/request.c index 056ccb04bb1..99db3b32639 100644 --- a/server/request.c +++ b/server/request.c @@ -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; }