Branch: Tag:

2000-11-02

2000-11-02 17:06:38 by Per Hedbor <ph@opera.com>

Do not attempt to cache files of unknown length, it might end in sorrow.

Rev: server/protocols/http.pike:1.284

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2000, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.283 2000/10/19 12:24:10 per Exp $"; + constant cvs_version = "$Id: http.pike,v 1.284 2000/11/02 17:06:38 per Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR   
1785: Inside #if defined(RAM_CACHE)
  #ifdef RAM_CACHE    if( (misc->cacheable > 0) && (file->data || file->file) )    { -  if( ((file->len + strlen( head_string )) < +  if( file->len>0 && // known length. +  ((file->len + strlen( head_string )) <    conf->datacache->max_file_size)    && misc->cachekey )    {