Branch: Tag:

2002-06-27

2002-06-27 12:48:50 by Anders Johansson <anders@roxen.com>

Avoid returning '304 Not modified' if misc->cacheable is set to 0.

Rev: server/protocols/http.pike:1.370

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2001, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.369 2002/05/03 19:58:58 per-bash Exp $"; + constant cvs_version = "$Id: http.pike,v 1.370 2002/06/27 12:48:50 anders Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR   
1652:    {    /* ({ time, len }) */    array(int) since_info = Roxen.parse_since( since ); - // werror("since: %{%O, %}\n" - // "lm: %O\n", - // since_info, - // misc->last_modified ); + // werror("since: %{%O, %}\n" + // "lm: %O\n" + // "cacheable: %O\n", + // since_info, + // misc->last_modified, + // 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)    // actually ok, or...   // || ((misc->cacheable>0)   // && (since_info[0] + misc->cacheable<= predef::time(1))