crowell / modpagespeed_tmp

Automatically exported from code.google.com/p/modpagespeed
Apache License 2.0
0 stars 0 forks source link

rewrite.log reports that MPS first (unnecessarily) applies pattern for a source and then it lets it pass through #637

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I was troubleshooting a different issue (using RewriteLogLevel 3/RewriteLog 
"/var/log/apache2/rewrite.log") when I noticed that MPS seems to first apply a 
pattern for a source:

123.45.67.89 - - [07/Mar/2013:09:37:26 +0200] 
[www.mysite.net/sid#7f8e5f8a0668][rid#7f8e5cef70a0/subreq] (3) [perdir 
/var/www/mysite/] applying pattern '^' to uri 'index.php'

...and right after that it lets it pass:

123.45.67.89 - - [07/Mar/2013:09:37:26 +0200] 
[www.mysite.net/sid#7f8e5f8a0668][rid#7f8e5cef70a0/subreq] (1) [perdir 
/var/www/mysite/] pass through /var/www/mysite/index.php

What is the expected output? What do you see instead?
If this is intended behavior, then please ignore this report. But shouldn't the 
logic be reverse? First check if the source should pass through and if so, then 
skip applying any pattern to it.

What version of the product are you using (please check X-Mod-Pagespeed
header)?
X-Mod-Pagespeed: 1.3.25.3-2556

On what operating system?
Ubuntu Server 12.10 x64

Which version of Apache?
2.2.22

Which MPM?
prefork.c (default)

URL of broken page:
not specific to a certain page

Original issue reported on code.google.com by klo...@gmail.com on 7 Mar 2013 at 9:06

GoogleCodeExporter commented 9 years ago
I'm going to merge this with your other issue. They seem to be the same issue.

Original comment by sligocki@google.com on 7 Mar 2013 at 3:42

GoogleCodeExporter commented 9 years ago
Well, not quite I think...

This one is about filters applied to sources when they should be skipped. You 
see, /var/www/mysite directory is excluded through the use of:

<Directory /var/www/mysite>
  <IfModule pagespeed_module>
    ModPagespeedDisallow *
  </IfModule>
</Directory>

The other issue is about sources that are meant to be processed (not excluded), 
but wrong patterns are being applied to them.

Original comment by klo...@gmail.com on 7 Mar 2013 at 7:48

GoogleCodeExporter commented 9 years ago
I think the point is that these messages are about mod_rewrite, which doesn't 
know anything about ModPagespeedDisallow.

Original comment by jmara...@google.com on 7 Mar 2013 at 7:53

GoogleCodeExporter commented 9 years ago
Ah, I see! You are right then. This is a duplicate. Let's take it to the other 
issue...

Original comment by klo...@gmail.com on 7 Mar 2013 at 8:47