/* 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;
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;
}
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) {
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) {
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);
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)
/* 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 &&
/* ...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 */ \
* 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;
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) {
* 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) {
* 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) {
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;
/* 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;
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;