From: Justin Erenkrantz Date: Sat, 29 Sep 2001 06:54:08 +0000 (+0000) Subject: Fix for httpd-test modules/include test #17. X-Git-Tag: 2.0.26~161 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=d7a730adcf2d7d6dfb9ed93862494317e9ccba9e;p=thirdparty%2Fapache%2Fhttpd.git Fix for httpd-test modules/include test #17. If we are *already* a faux URI (i.e. relative file sub req) and we then make a subrequest from that faux URI to a file in the same directory, we'd try to build a URI out of the fake URI which leads to the wrong thing happening somewhere down the line. So, let's just give this special case a fake URI as well. OtherBill needs to verify this. He can back it out if he wants. I don't much care. It's one line and it seems okay... git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91187 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/request.c b/server/request.c index 50cfbfe6d57..d2efdfce271 100644 --- a/server/request.c +++ b/server/request.c @@ -1747,7 +1747,8 @@ AP_DECLARE(request_rec *) ap_sub_req_lookup_file(const char *new_file, if (strncmp(rnew->filename, fdir, fdirlen) == 0 && rnew->filename[fdirlen] - && ap_strchr_c(rnew->filename + fdirlen, '/') == NULL) + && ap_strchr_c(rnew->filename + fdirlen, '/') == NULL + && strlen(r->uri) != 0) { char *udir = ap_make_dirstr_parent(rnew->pool, r->uri);