You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2017/05/19 18:41:01 UTC

[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@httpd.apache.org
          Reporter: sg3235@att.com
  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@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


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

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61108

Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Eric Covener <co...@gmail.com> ---
There's no cache for -f or -d,   Can you share LogLevel trace8 output in a
recreate?

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


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

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61108

--- Comment #2 from Stephen Gevers <sg...@att.com> ---
I had set the trace level to 6 earlier.  I was seeing this trace message even
though the file existed:

[Fri May 19 14:36:56.405217 2017] [rewrite:trace4] [pid 67508:tid
139724855404288] mod_rewrite.c(477): [client 135.213.232.7:1465] 135.213.232.7
- - [wiki3.dev.att.com/sid#d4bf78][rid#7f14400d41f0/initial] RewriteCond:
input='/opt/app/workload/nas/reldir/dev3/cmnshr/maintenance/wiki.txt'
pattern='-f' => not-matched

After restarting apache, it changed to this:

[Fri May 19 14:44:58.340292 2017] [rewrite:trace4] [pid 67514:tid
139724519728896] mod_rewrite.c(477): [client 135.213.232.6:2005] 135.213.232.6
- - [wiki3.dev.att.com/sid#d4bf78][rid#7f140800bf60/initial] RewriteCond:
input='/opt/app/workload/nas/reldir/dev3/cmnshr/maintenance/wiki.txt'
pattern='-f' => matched

Hoping to get the information you asked for, I set the trace level to 8.  I
don't see any additional messages, but I'm getting the behavior I expect.  I
went back and set the log level back to warn, and I'm still getting the
behavior I expect.  So I guess there's nothing to do here.  Not sure what was
happening before or how I may have screwed up the test, but I'm sorry to have
wasted your time.

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


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

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61108

Stephen Gevers <sg...@att.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|Mac OS X 10.1               |Linux

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


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

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61108

Justin Iurman <iu...@live.be> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEEDINFO                    |RESOLVED

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