>Number: 3596 >Category: mod_dir >Synopsis: mod_dir doesn't handle requests which must be processed >internally by mod_proxy >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: open >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Mon Dec 28 04:00:01 PST 1998 >Last-Modified: >Originator: [EMAIL PROTECTED] >Organization: apache >Release: 1.3.3 >Environment: Linux 2.0.36 (RedHat 5.2), gcc version 2.7.2.3 >Description: We have a virtual site where the index pages are dynamically generated by some mod_perl scripts. So, we use currently something like this in httpd.conf:
DirectoryIndex index.html Redirect /index.html http://this_server/index.perl permanent ProxyPass /index.perl http://mod_perl_server/index.perl For marketing, technical (whatever) reasons, we would like to use a setup where the users aren't redirected to index.perl, but mod_dir should handle this transparently. Something like this: DirectoryIndex index.perl index.html ProxyPass /index.perl http://mod_perl_server/index.perl The later setup doesn't work because mod_dir tries to be, unfortunately, too smart :) It does a subrequest for index.perl, and this subrequest returns with a status code of HTTP_OK. Nevertheless, mod_dir does an additional check to see if index.perl is a file, which gives a false result because index.perl is handled by mod_proxy and so, no file info is available. IMHO this file access check is wasteful because to serve a resource mod_dir makes anyway an internal redirect and if the status code for the subrequest was HTTP_OK, what good will bring the file access check? I would like if mod_dir will drop the file access check. Thank you! >How-To-Repeat: I suppose that the information in description is enough, otherwise i'll prepare a complete example. >Fix: --- src/modules/standard/mod_dir.c.orig Mon Dec 28 12:24:56 1998 +++ src/modules/standard/mod_dir.c Mon Dec 28 13:00:35 1998 @@ -161,7 +161,7 @@ char *name_ptr = *names_ptr; request_rec *rr = ap_sub_req_lookup_uri(name_ptr, r); - if (rr->status == HTTP_OK && rr->finfo.st_mode != 0) { + if (rr->status == HTTP_OK) { char *new_uri = escape_uri(r->pool, rr->uri); if (rr->args != NULL) >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include <[EMAIL PROTECTED]> in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ] [If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request ] [from a developer. ] [Reply only with text; DO NOT SEND ATTACHMENTS! ]
