You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Roman Meytin <ro...@isoTree.com> on 2002/09/26 11:45:06 UTC

[users@httpd] Sneaky bug? Problems with Filesmatch not always matching?

I have been up for a while trying to track down an annoying bug.                               
Basically what happens is *sometimes* certain files which are not to going                     
through mason are put through the autohandler.  This cause HTTP headers to                     
sometimes appear in plain html pages as well as images not to load                             
correctly.                                                                                     
                                                                                               
First:                                                                                         
I am using mason 1.13 with apache Apache/1.3.26 and perl 5.8.0.                                
                                                                                               
Second:                                                                                        
apache is configured to call mason on all .JS and .htm files in a certain                      
directory.  Like so:                                                                           
<Directory  /var/www/apache/mason/>                                                            
    <FilesMatch "\.(htm|JS)$">                                                                 
        DefaultType text/html                                                                  
        SetHandler perl-script                                                                 
        PerlHandler MyMason::MyApp                                                             
    </FilesMatch>                                                                              
    Options FollowSymLinks                                                                     
</Directory>                                                                                   
                                                                                               
Third:  I have now successfully replicated this "off and on" bug by                            
creating a page test.html which has a tag:  <META HTTP-EQUIV="Refresh"                         
CONTENT="1; URL=/test.html">.  So this page continuously loads itself over                     
and over.  I have also disabled cache in my browser to make sure it does.                      
                                                                                               
Fourth:  Eventually after displaying the page successfully a few dozen                         
times I got a page which had a cut off autohandler from that directory                         
(missing the first few lines), with an HTTP header on the bottom.  It                          
looked like this:  
----start view source----------------                                                          
th="0" marginheight="0">                                                                       
  <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>                                                 
        <TR>                                                                                   
           <TD><IMG SRC="/images2/header/header2_01.gif" WIDTH=150                             
HEIGHT=61 alt="lil car"></TD>                                                                  
           <TD><IMG SRC="/images2/header/header2_02.gif" WIDTH=449                             
HEIGHT=61 alt="Welcome to our site"></TD>                                                      
           <TD><IMG SRC="/images2/header/header2_03.gif" WIDTH=141                             
HEIGHT=61 alt="Remember 9-11"></TD>                                                            
        </TR>                                                                                  
        <TR>                                                                                   
           <TD COLSPAN=3><IMG SRC="/images2/header/header2_04.gif"                             
WIDTH=740 HEIGHT=18 alt="Guide to Shopping Online"></TD>                                       
        </TR>                                                                                  
  </TABLE>                                                                                     
                                                                                               
  <table border="0" width="750" cellspacing="10" cellpadding="0">                              
        <tr>                                                                                   
         <td valign="top" align="center" colspan="3">                                          
         <br><span style="FONT-FAMILY: Verdana, Arial, Helvetica;                              
FONT-SIZE:B 8pt"><img src="/images/gr_line.gif" WIDTH="700" HEIGHT="12"                        
alt="ln"><br>                                                                                  
         <font color="#000000">[DISCLAIMER TEXT]</font></span></td>                            
       </tr>                                                                                   
  </table>                                                                                     
  </body>                                                                                      
</html>                                                                                        
                                                                                               
                                                                                               
HTTP/1.1 304 Not Modified                                                                      
Date: Thu, 26 Sep 2002 06:18:24 GMT                                                            
Server: Apache/1.3.26 (Unix) PHP/4.2.3 mod_perl/1.27                                           
Connection: Keep-Alive                                                                         
Keep-Alive: timeout=15, max=37                                                                 
ETag: "1ff06b-1ac-3d92a58d"                                                                    
---------------------------end view source-----------------------                              
                                                                                               
Mason should not be touching this page at all as it is .html!  And it                          
doesn;t 90% of the time, yet every now and then it seems to mess up                            
these regular files.  I think i have it configured properly and it may be                      
apaches fault that mason is misbehaving?  Please ohh please help me with                       
this problem.                                                                                  
                                                                                               
Thanks                                                                                         
-roman                       




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org