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 2008/06/25 01:34:37 UTC

DO NOT REPLY [Bug 45273] New: mod_dir bypasses mod_cache

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

           Summary: mod_dir bypasses mod_cache
           Product: Apache httpd-2
           Version: 2.2.9
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_dir
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: anr@safira.com


Requests handled by mod_dir are not cached. Examples below.


1) Cached request:

$ curl -s http://localhost/index.html > /dev/null
$ curl -I http://localhost/index.html
HTTP/1.1 200 OK
Date: Tue, 24 Jun 2008 23:19:41 GMT
Server: Apache/2.2.9 (Unix)
Last-Modified: Mon, 09 Jun 2008 13:16:13 GMT
ETag: "481a3-10c0-44f3b9d9fc140"
Accept-Ranges: bytes
Content-Length: 4288
Cache-Control: max-age=120
Expires: Tue, 24 Jun 2008 23:21:28 GMT
Age: 13
Content-Type: text/html


2) Uncached request (via mod_dir):

$ curl -s http://localhost/ > /dev/null
$ curl -I http://localhost/
HTTP/1.1 200 OK
Date: Tue, 24 Jun 2008 23:22:39 GMT
Server: Apache/2.2.9 (Unix)
Last-Modified: Mon, 09 Jun 2008 13:16:13 GMT
ETag: "481a3-10c0-44f3b9d9fc140"
Accept-Ranges: bytes
Content-Length: 4288
Cache-Control: max-age=120
Expires: Tue, 24 Jun 2008 23:24:39 GMT
Content-Type: text/html


Some snippets of the httpd.conf file:

---------------------------------

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all

    ExpiresActive On

    <Files ~ "^index.html$">
         ExpiresDefault A120
    </Files>
</Directory>

CacheRoot   /var/cache/apache/
CacheEnable disk /
CacheDirLevels 2
CacheDirLength 1

CacheIgnoreCacheControl On

<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

---------------------------------


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 45273] mod_dir bypasses mod_cache

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

--- Comment #3 from duchuanying <hu...@gmail.com> 2010-03-08 11:28:01 UTC ---

In mod_dir,  used ap_internal_fast_redirect, so  CACHE_SAVE filter is not
executed. 

mod_dir use fast_redirect only when the file is local static file. 

        if (rr->status == HTTP_OK
            && (   (rr->handler && !strcmp(rr->handler, "proxy-server"))
                || rr->finfo.filetype == APR_REG)) {
            ap_internal_fast_redirect(rr, r); 
            return OK; 
        }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 45273] mod_dir bypasses mod_cache

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

--- Comment #2 from duchuanying <hu...@gmail.com> 2010-03-08 11:26:10 UTC ---

In mod_dir,  used ap_internal_fast_redirect, so  CACHE_SAVE filter is not
executed. 

mod_dir use fast_redirect only when the file is local static file. 

        if (rr->status == HTTP_OK
            && (   (rr->handler && !strcmp(rr->handler, "proxy-server"))
                || rr->finfo.filetype == APR_REG)) {
            ap_internal_fast_redirect(rr, r); 
            return OK; 
        }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 45273] mod_dir bypasses mod_cache

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

Ruediger Pluem <rp...@apache.org> changed:

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

--- Comment #6 from Ruediger Pluem <rp...@apache.org> 2011-04-14 02:28:42 EDT ---
This should be fixed in the latest 2.2.x release. Can you please test?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 45273] mod_dir bypasses mod_cache

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

Geoff Millikan <gm...@t1shopper.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |major

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 45273] mod_dir bypasses mod_cache

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

--- Comment #4 from Geoff Millikan <gm...@t1shopper.com> 2011-04-13 18:19:52 EDT ---
As described on duplicate Bug 51057, this bug produces a significant loss of
functionality for example:

This URL is cached (because the DirectoryIndex of mod_dir is not being used):
http://www.my-company.com/index.php

This URL is _not_ cached because it is using the DirectoryIndex directive:
http://www.my-company.com/

The "home page" of a web site is frequently visited.  And it's not getting
cached.  This is a significant loss of functionality mod_disk_cache is desired
to provide.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 45273] mod_dir bypasses mod_cache

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

Geoff Millikan <gm...@t1shopper.com> changed:

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

--- Comment #7 from Geoff Millikan <gm...@t1shopper.com> 2011-04-22 18:53:39 EDT ---
Yes, in production release of 2.2.17 I confirm it's fixed.  I compiled from
source for CentOS 5.6.

---== Details ==---
# cat /etc/*release*
CentOS release 5.6 (Final)

#uname -a 
OS: Linux 2.6.18-238.5.1.el5 #1 SMP Fri Apr 1 18:41:58 EDT 2011 x86_64

# /usr/local/apache2/bin/httpd -V
Server version: Apache/2.2.17 (Unix)
Server built:   Apr 22 2011 21:56:30
Server's Module Magic Number: 20051115:25
Server loaded:  APR 1.4.2, APR-Util 1.3.10
Compiled using: APR 1.4.2, APR-Util 1.3.10
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=2
 -D HTTPD_ROOT="/usr/local/apache2"
 -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

---== Configure statement ==---
./configure --prefix="/usr/local/apache2" CFLAGS="-DDYNAMIC_MODULE_LIMIT=2
-DDEFAULT_PIDLOG=\"run/httpd.pid\"" --disable-imagemap --disable-userdir
--disable-asis --disable-actions --disable-authn-default
--disable-authz-groupfile --disable-authz-default --disable-filter
--disable-negotiation --disable-version --disable-cgi --enable-autoindex
--enable-cache --enable-expires=shared --enable-disk-cache --enable-deflate
--enable-headers --enable-info=shared --enable-rewrite --enable-ssl
--enable-proxy --disable-proxy-balancer --disable-proxy-ftp
--disable-proxy-scgi --disable-proxy-ajp --disable-proxy-balancer
--enable-reqtimeout --enable-vhost-alias --enable-mime --with-mpm=prefork

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 45273] mod_dir bypasses mod_cache

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

Antoine Prevosto <an...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |antoine.prevosto@gmail.com

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 45273] mod_dir bypasses mod_cache

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gmillikan@t1shopper.com

--- Comment #5 from Eric Covener <co...@gmail.com> 2011-04-13 20:41:25 EDT ---
*** Bug 51057 has been marked as a duplicate of this bug. ***

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 45273] mod_dir bypasses mod_cache

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


Ruediger Pluem <rp...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mkevac@gmail.com




--- Comment #1 from Ruediger Pluem <rp...@apache.org>  2008-07-06 06:21:27 PST ---
*** Bug 45347 has been marked as a duplicate of this bug. ***


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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