osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug 61108] New: RewriteCond -f caches results after first test


https://bz.apache.org/bugzilla/show_bug.cgi?id=61108

            Bug ID: 61108
           Summary: RewriteCond -f caches results after first test
           Product: Apache httpd-2
           Version: 2.4.25
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_rewrite
          Assignee: bugs@xxxxxxxxxxxxxxxx
          Reporter: sg3235@xxxxxxx
  Target Milestone: ---

In Apache 2.2, we had a RewriteCond rule that tested for the existence of a
specific file and redirect most requests to a static HTML file when the file
existed.  Creating the file while apache was running would cause the static
HTML file to be displayed immediately, and removing the file while apache was
running would bypass the RewriteRule.  The set of rules is:

RewriteCond /opt/app/workload/nas/reldir/dev3/cmnshr/maintenance/wiki.txt -f
RewriteCond %{HTTP_COOKIE} !AllowMaintenance
RewriteCond %{REQUEST_URI} !^/cmn/(.*)
RewriteCond %{REQUEST_URI} !^/common/(.*)
RewriteRule ^/.* /cmn/maintenance-wiki.html [NE,L,P]

With version 2.4, it appears that apache is caching the result of the -f test. 
Thus, creating the file while apache is running has no effect.  Restarting
apache after creating the file causes the test to behave as expected.  However,
apache must be restarted for the removal of the file to be effective as well.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: bugs-help@xxxxxxxxxxxxxxxx