Branch: Tag:

2002-08-28

2002-08-28 17:04:03 by Anders Johansson <anders@roxen.com>

Stating a file could have the side effect of setting id->misc->stat, which in turn could mean that Last-Modified for the requested page got it's value from the stated file. Now id->misc->stat is hopefully never set for internal requests/stat calls.

Rev: server/modules/graphics/cimg.pike:1.52
Rev: server/modules/graphics/gbutton.pike:1.96

7:      roxen.ImageCache the_cache;    - constant cvs_version = "$Id: cimg.pike,v 1.51 2002/07/01 09:12:16 anders Exp $"; + constant cvs_version = "$Id: cimg.pike,v 1.52 2002/08/28 17:04:03 anders Exp $";   constant module_type = MODULE_TAG;   constant module_name = "Graphics: Image converter";   constant module_doc = "Provides the tag <tt>&lt;cimg&gt;</tt> that can be used "
240:    catch    {    a->src = Roxen.fix_relative( args->src, id ); +  int was_internal = id->misc->internal_get; +  id->misc->internal_get = 1;    Stat st = id->conf->stat_file(a->src, id) || file_stat(a->src); -  +  if (!was_internal) +  m_delete(id->misc, "internal_get");    if (st)    {    string fn = id->conf->real_file( a->src, id );