summaryrefslogtreecommitdiffstats
path: root/modules/http
diff options
context:
space:
mode:
authorBill Stoddard <stoddard@apache.org>2002-03-27 23:42:16 +0100
committerBill Stoddard <stoddard@apache.org>2002-03-27 23:42:16 +0100
commit7da34b011deafd938e7e696b44aeef31afd316cc (patch)
tree06b974d7140acb82800b46217be7a110a8f52190 /modules/http
parentadd license (diff)
downloadapache2-7da34b011deafd938e7e696b44aeef31afd316cc.tar.xz
apache2-7da34b011deafd938e7e696b44aeef31afd316cc.zip
Add a new parameter to the quick_handler hook to instruct
quick handlers to optionally do a lookup rather than actually serve content. This is the first of several changes required fix several problems with how quick handlers work with subrequests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94240 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http')
-rw-r--r--modules/http/http_request.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/modules/http/http_request.c b/modules/http/http_request.c
index 50a7c68b27..36b1ceed12 100644
--- a/modules/http/http_request.c
+++ b/modules/http/http_request.c
@@ -239,11 +239,29 @@ void ap_process_request(request_rec *r)
{
int access_status;
- access_status = ap_process_request_internal(r);
- if (access_status == OK) {
- access_status = ap_invoke_handler(r);
+ /* Give quick handlers a shot at serving the request on the fast
+ * path, bypassing all of the other Apache hooks.
+ *
+ * This hook was added to enable serving files out of a URI keyed
+ * content cache ( e.g., Mike Abbott's Quick Shortcut Cache,
+ * described here: http://oss.sgi.com/projects/apache/mod_qsc.html )
+ *
+ * It may have other uses as well, such as routing requests directly to
+ * content handlers that have the ability to grok HTTP and do their
+ * own access checking, etc (e.g. servlet engines).
+ *
+ * Use this hook with extreme care and only if you know what you are
+ * doing.
+ */
+ access_status = ap_run_quick_handler(r, 0); /* Not a look-up request */
+ if (access_status == DECLINED) {
+ access_status = ap_process_request_internal(r);
+ if (access_status == OK) {
+ access_status = ap_invoke_handler(r);
+ }
}
- else if (access_status == DONE) {
+
+ if (access_status == DONE) {
/* e.g., something not in storage like TRACE */
access_status = OK;
}