httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 21260] - CacheMaxExpire directive not enforced !
Date Wed, 02 Jul 2003 23:11:44 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21260>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21260

CacheMaxExpire directive not enforced !





------- Additional Comments From jhroyer@joher.com  2003-07-02 23:11 -------
I quickly fixed it using this code in mod_proxy.c:

Replacing:
    if (expc == BAD_DATE) {
...
    }
By:
   {
        double x = conf->cache.maxexpire;
        int y = 0;
        if (expc == BAD_DATE) {
             if (lmod != BAD_DATE)
                 x = (double)(date - lmod) * conf->cache.lmfactor;
             else
                 x = conf->cache.defaultexpire;
             y = 1;
        }
        else
             x = expc - now;
        if(x > conf->cache.maxexpire) {
             x = conf->cache.maxexpire;
             y = 1;
        }
        expc = now + (int)x;
        if(y)
             ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, r-
>server, "Expiry date calculated %ld", (long)expc);  
   }

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message