Branch: Tag:

2002-11-01

2002-11-01 12:57:05 by Anders Johansson <anders@roxen.com>

Don't return "Not Modified" (304) if misc->cacheable has been lowered.
This prevents always sending 304 answers to a browser supplying a
if-modified-since header when the page is expected to expire due to
some dynamic RXML. However, if the expire time isn't lowered below
INITIAL_CACHEABLE (5 min) the browser will still get 304 answers
forever (or until the page really is modified).

Rev: server/protocols/http.pike:1.383

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2001, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.382 2002/11/01 10:48:16 anders Exp $"; + constant cvs_version = "$Id: http.pike,v 1.383 2002/11/01 12:57:05 anders Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR   
1620:   // misc->cacheable);    if ( ((since_info[0] >= misc->last_modified) &&    ((since_info[1] == -1) || (since_info[1] == file->len))) -  // never say 'not modified' if not cacheable at all. -  && (misc->cacheable != 0) +  // never say 'not modified' if cacheable has been lowered. +  && (misc->cacheable >= INITIAL_CACHEABLE)    // actually ok, or...   // || ((misc->cacheable>0)   // && (since_info[0] + misc->cacheable<= predef::time(1))