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 2013/03/20 18:47:27 UTC

[Bug 54733] New: 0 bytes file, assumed that it does not exists

https://issues.apache.org/bugzilla/show_bug.cgi?id=54733

            Bug ID: 54733
           Summary: 0 bytes file, assumed that it does not exists
           Product: Apache httpd-2
           Version: 2.2.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_rewrite
          Assignee: bugs@httpd.apache.org
          Reporter: omar.php@gmail.com
    Classification: Unclassified

I have got .htaccess with the following rules:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

RewriteRule ^.*$ index.php [NC,L]

Which supposed to deliver the file contents when it exists physically, however
when the file is empty (0 bytes) it ignores the condition and assumes the file
does not exists, and executes the next rule (the last line).

The resulting behavior produces errors on my application.

Server Info:
Server version: Apache/2.2.22 (Ubuntu)
Server built:   Nov  8 2012 21:37:30

-- 
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 54733] 0 bytes file, assumed that it does not exists

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
            Version|2.2.2                       |2.2.22

--- Comment #1 from Eric Covener <co...@gmail.com> ---
Can you attach a RewiteLog?

-- 
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 54733] 0 bytes file, assumed that it does not exists

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

--- Comment #2 from Stefan Fritsch <sf...@sfritsch.de> ---

http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html says:

'-s' (is regular file, with size)
Treats the TestString as a pathname and tests whether or not it exists, and is
a regular file with size greater than zero.

So I would say it works as documented.

-- 
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 54733] 0 bytes file, assumed that it does not exists

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

Stefan Fritsch <sf...@sfritsch.de> changed:

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

--- Comment #3 from Stefan Fritsch <sf...@sfritsch.de> ---
I think you are looking for -f instead of -s

Please reopen if I am mistaken.

-- 
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