Branch: Tag:

2001-02-01

2001-02-01 03:16:11 by Per Hedbor <ph@opera.com>

Fixed [Bug 1130 (#1130)]

Rev: server/protocols/http.pike:1.299

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2000, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.298 2001/01/28 05:44:15 per Exp $"; + constant cvs_version = "$Id: http.pike,v 1.299 2001/02/01 03:16:11 per Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR   
1613:    if(!file->raw)    {    heads = ([]); -  if( !file->len ) -  { +     if(objectp(file->file))    if(!file->stat && !(file->stat=misc->stat))    file->stat = file->file->stat(); -  array fstat; -  if(arrayp(fstat = file->stat)) +  +  if( Stat fstat = file->stat )    {    if( !file->len )    file->len = fstat[1];    -  if (fstat[ST_MTIME] > misc->last_modified) { +  if ( fstat[ST_MTIME] > misc->last_modified )    misc->last_modified = fstat[ST_MTIME]; -  } +     -  if(prot != "HTTP/0.9" && (misc->cacheable==INITIAL_CACHEABLE) ) +  if(prot != "HTTP/0.9" && (misc->cacheable >= INITIAL_CACHEABLE) )    {    heads["Last-Modified"] = Roxen.http_date(misc->last_modified);   
1651:    }    }    } -  } +     if(prot != "HTTP/0.9")    {    string h, charset="";