]> granicus.if.org Git - apache/commitdiff
add the "next filter" parameter to the rest of the ap_sub_req_* calls.
authorGreg Stein <gstein@apache.org>
Thu, 23 Nov 2000 13:03:46 +0000 (13:03 +0000)
committerGreg Stein <gstein@apache.org>
Thu, 23 Nov 2000 13:03:46 +0000 (13:03 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87076 13f79535-47bb-0310-9956-ffa450edef68

modules/arch/win32/mod_isapi.c
modules/filters/mod_include.c
modules/mappers/mod_dir.c
modules/mappers/mod_rewrite.c
modules/metadata/mod_cern_meta.c
modules/metadata/mod_mime_magic.c
modules/test/mod_autoindex.c
os/win32/mod_isapi.c

index bc2f3b9ab456b93a8cea1cdfe9dedc71581658ab..fd4ccc964652bd766b3d7f47e5c4c92566451292 100644 (file)
@@ -816,7 +816,8 @@ BOOL WINAPI ServerSupportFunction(HCONN hConn, DWORD dwHSERequest,
         /* Map a URL to a filename */
         char *file = (char *)lpvBuffer;
         DWORD len;
-        subreq = ap_sub_req_lookup_uri(apr_pstrndup(r->pool, file, *lpdwSize), r);
+        subreq = ap_sub_req_lookup_uri(apr_pstrndup(r->pool, file, *lpdwSize),
+                                       r, NULL);
 
         len = apr_cpystrn(file, subreq->filename, *lpdwSize) - file;
 
@@ -996,7 +997,7 @@ BOOL WINAPI ServerSupportFunction(HCONN hConn, DWORD dwHSERequest,
         LPHSE_URL_MAPEX_INFO info = (LPHSE_URL_MAPEX_INFO) lpdwDataType;
         char* test_uri = apr_pstrndup(r->pool, (char *)lpvBuffer, *lpdwSize);
 
-        subreq = ap_sub_req_lookup_uri(test_uri, r);
+        subreq = ap_sub_req_lookup_uri(test_uri, r, NULL);
         info->cchMatchingURL = strlen(test_uri);        
         info->cchMatchingPath = apr_cpystrn(info->lpszPath, subreq->filename, 
                                             MAX_PATH) - info->lpszPath;
index 8731d65602bfb7a5200d0fe655e501c1536b154a..350dadc9653c5158547afbbb02330935dc33988b 100644 (file)
@@ -1359,6 +1359,9 @@ static int find_file(request_rec *r, const char *directive, const char *tag,
         }
         else {
             ap_getparents(tag_val);    /* get rid of any nasties */
+
+            /* note: it is okay to pass NULL for the "next filter" since
+               we never attempt to "run" this sub request. */
             rr = ap_sub_req_lookup_file(tag_val, r, NULL);
 
             if (rr->status == HTTP_OK && rr->finfo.protection != 0) {
@@ -1387,6 +1390,8 @@ static int find_file(request_rec *r, const char *directive, const char *tag,
         return ret;
     }
     else if (!strcmp(tag, "virtual")) {
+        /* note: it is okay to pass NULL for the "next filter" since
+           we never attempt to "run" this sub request. */
         rr = ap_sub_req_lookup_uri(tag_val, r, NULL);
 
         if (rr->status == HTTP_OK && rr->finfo.protection != 0) {
index 76ccdc3ea986fd976dc5fc722e178a313fba1666..dec70e38083e7a450ea223426133f816f6fb5cc9 100644 (file)
@@ -161,7 +161,7 @@ static int handle_dir(request_rec *r)
 
     for (; num_names; ++names_ptr, --num_names) {
         char *name_ptr = *names_ptr;
-        request_rec *rr = ap_sub_req_lookup_uri(name_ptr, r, r->output_filters);
+        request_rec *rr = ap_sub_req_lookup_uri(name_ptr, r, NULL);
 
         if (rr->status == HTTP_OK && rr->finfo.filetype == APR_REG) {
             char *new_uri = ap_escape_uri(r->pool, rr->uri);
index ed3613e199345a3f50a350790f7ec0d1a066480d..32168c20ac2ea01e3c66a9d6bd9c606af7cc865e 100644 (file)
@@ -2190,7 +2190,7 @@ static int apply_rewrite_cond(request_rec *r, rewritecond_entry *p,
         if (strlen(input) > 0 && subreq_ok(r)) {
 
             /* run a URI-based subrequest */
-            rsub = ap_sub_req_lookup_uri(input, r);
+            rsub = ap_sub_req_lookup_uri(input, r, NULL);
 
             /* URI exists for any result up to 3xx, redirects allowed */
             if (rsub->status < 400)
@@ -2211,7 +2211,7 @@ static int apply_rewrite_cond(request_rec *r, rewritecond_entry *p,
             /* process a file-based subrequest:
              * this differs from -U in that no path translation is done.
              */
-            rsub = ap_sub_req_lookup_file(input, r);
+            rsub = ap_sub_req_lookup_file(input, r, NULL);
 
             /* file exists for any result up to 2xx, no redirects */
             if (rsub->status < 300 &&
@@ -3595,7 +3595,7 @@ static char *lookup_variable(request_rec *r, char *var)
                         /*   ...and sub and main paths differ */ \
                         && strcmp(r->main->uri, r->uri) != 0))) { \
             /* process a file-based subrequest */ \
-            rsub = subrecfunc(r->filename, r); \
+            rsub = subrecfunc(r->filename, r, NULL); \
             /* now recursively lookup the variable in the sub_req */ \
             result = lookup_variable(rsub, var+5); \
             /* copy it up to our scope before we destroy sub_req's apr_pool_t */ \
index f65909a7fa7bc6e0e2b1d7551768f8dea78d2e2d..f492cd9a6b6cb9cccef8aa494eaaac92319816a1 100644 (file)
@@ -359,7 +359,7 @@ static int add_cern_meta_data(request_rec *r)
      * A better solution might be a "safe open" feature of pfopen to avoid
      * pipes, symlinks, and crap like that.
      */
-    rr = ap_sub_req_lookup_file(metafilename, r);
+    rr = ap_sub_req_lookup_file(metafilename, r, NULL);
     if (rr->status != HTTP_OK) {
        ap_destroy_sub_req(rr);
        return DECLINED;
index 66bb811370a243a010bb0e7bae1b4c50fe2f9be3..d2ed7ef8823acef7f9b4d20a550cd53db95e513c 100644 (file)
@@ -2347,7 +2347,7 @@ static int revision_suffix(request_rec *r)
     ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_DEBUG, 0, r,
                MODNAME ": subrequest lookup for %s", sub_filename);
 #endif /* MIME_MAGIC_DEBUG */
-    sub = ap_sub_req_lookup_file(sub_filename, r);
+    sub = ap_sub_req_lookup_file(sub_filename, r, NULL);
 
     /* extract content type/encoding/language from sub-request */
     if (sub->content_type) {
index 3329d8da143e3ffadc57d4c09de97c0dd9f8d34b..793fa19de4936f689683fb18edcde9d6b1bc4115 100644 (file)
@@ -974,7 +974,7 @@ static void emit_head(request_rec *r, char *header_fname, int suppress_amble,
      * pretend there's nothing there.
      */
     if ((header_fname != NULL)
-       && (rr = ap_sub_req_lookup_uri(header_fname, r))
+       && (rr = ap_sub_req_lookup_uri(header_fname, r, NULL))
        && (rr->status == HTTP_OK)
        && (rr->filename != NULL)
        && rr->finfo.filetype == APR_REG) {
@@ -1057,7 +1057,7 @@ static void emit_tail(request_rec *r, char *readme_fname, int suppress_amble)
      * pretend there's nothing there.
      */
     if ((readme_fname != NULL)
-       && (rr = ap_sub_req_lookup_uri(readme_fname, r))
+       && (rr = ap_sub_req_lookup_uri(readme_fname, r, NULL))
        && (rr->status == HTTP_OK)
        && (rr->filename != NULL)
        && rr->finfo.filetype == APR_REG) {
@@ -1184,7 +1184,7 @@ static struct ent *make_autoindex_entry(char *name, int autoindex_opts,
     p->version_sort = autoindex_opts & VERSION_SORT;
 
     if (autoindex_opts & FANCY_INDEXING) {
-        request_rec *rr = ap_sub_req_lookup_file(name, r);
+        request_rec *rr = ap_sub_req_lookup_file(name, r, NULL);
 
        if (rr->finfo.protection != 0) {
            p->lm = rr->finfo.mtime;
index bc2f3b9ab456b93a8cea1cdfe9dedc71581658ab..fd4ccc964652bd766b3d7f47e5c4c92566451292 100644 (file)
@@ -816,7 +816,8 @@ BOOL WINAPI ServerSupportFunction(HCONN hConn, DWORD dwHSERequest,
         /* Map a URL to a filename */
         char *file = (char *)lpvBuffer;
         DWORD len;
-        subreq = ap_sub_req_lookup_uri(apr_pstrndup(r->pool, file, *lpdwSize), r);
+        subreq = ap_sub_req_lookup_uri(apr_pstrndup(r->pool, file, *lpdwSize),
+                                       r, NULL);
 
         len = apr_cpystrn(file, subreq->filename, *lpdwSize) - file;
 
@@ -996,7 +997,7 @@ BOOL WINAPI ServerSupportFunction(HCONN hConn, DWORD dwHSERequest,
         LPHSE_URL_MAPEX_INFO info = (LPHSE_URL_MAPEX_INFO) lpdwDataType;
         char* test_uri = apr_pstrndup(r->pool, (char *)lpvBuffer, *lpdwSize);
 
-        subreq = ap_sub_req_lookup_uri(test_uri, r);
+        subreq = ap_sub_req_lookup_uri(test_uri, r, NULL);
         info->cchMatchingURL = strlen(test_uri);        
         info->cchMatchingPath = apr_cpystrn(info->lpszPath, subreq->filename, 
                                             MAX_PATH) - info->lpszPath;