Commit a9860c7c authored by Greg Stein's avatar Greg Stein
Browse files

add the "next filter" parameter to the rest of the ap_sub_req_* calls.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87076 13f79535-47bb-0310-9956-ffa450edef68
parent 81019eac
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;
+5 −0
Original line number Diff line number Diff line
@@ -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) {
+1 −1
Original line number Diff line number Diff line
@@ -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);
+3 −3
Original line number Diff line number Diff line
@@ -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 */ \
+1 −1
Original line number Diff line number Diff line
@@ -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;
Loading