summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2001-08-31 15:45:16 +0200
committerWilliam A. Rowe Jr <wrowe@apache.org>2001-08-31 15:45:16 +0200
commit05a55c7cc9845f6304e10ff173e13e382c07fa72 (patch)
treef2ec8eee3efdc46ce455c7618799f68a133cc7e7
parentresolve_symlink() is only used if REPLACE_PATH_INFO_METHOD is (diff)
downloadapache2-05a55c7cc9845f6304e10ff173e13e382c07fa72.tar.xz
apache2-05a55c7cc9845f6304e10ff173e13e382c07fa72.zip
Can it be this simple? No, probably not, but this fast-hack will get
us going again for a while. We are currently rejecting some internal file_sub_req()'s in the translate phase. I don't like this hack because of risks it potentially exposes, but for today, if we have a filename - and we are a subrequest, then let it fly without further mapping. This allows us to serve up the default "/" request (run through mod_dir->mod_negotiation->mod_mime) without a 400 error. The right solution is to set up some traps and escapes for the subreq mechanism, possibly with a subreq translate hook, and drop the URI entirely for these cases. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90847 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--server/core.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/core.c b/server/core.c
index d8b95f63b5..0663e6b3a8 100644
--- a/server/core.c
+++ b/server/core.c
@@ -2867,13 +2867,19 @@ AP_DECLARE_NONSTD(int) ap_core_translate(request_rec *r)
void *sconf = r->server->module_config;
core_server_config *conf = ap_get_module_config(sconf, &core_module);
+ /* XXX We have already been here, or another module did the work
+ * for us. At this moment, we will enable only file subrequests.
+ */
+ if (r->main && r->filename)
+ return OK;
+
/* XXX this seems too specific, this should probably become
* some general-case test
*/
if (r->proxyreq) {
return HTTP_FORBIDDEN;
}
- if ((r->uri[0] != '/') && strcmp(r->uri, "*")) {
+ if (!r->uri || ((r->uri[0] != '/') && strcmp(r->uri, "*"))) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Invalid URI in request %s", r->the_request);
return HTTP_BAD_REQUEST;