Roxen.git / server / plugins / protocols / http.pike

version» Context lines:

Roxen.git/server/plugins/protocols/http.pike:1:   // This is a ChiliMoon protocol module.   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2001, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.407 2004/06/04 08:29:30 _cvs_stephen Exp $"; + constant cvs_version = "$Id: http.pike,v 1.408 2004/06/04 22:39:22 _cvs_stephen Exp $";   //#define REQUEST_DEBUG   //#define CONNECTION_DEBUG   #define MAGIC_ERROR   #define HTTPTIMEOUT 90      // HTTP protocol module.   #include <config.h>   #define TIMER_PREFIX "http:"   #include <timers.h>   #include <stat.h>
Roxen.git/server/plugins/protocols/http.pike:2101: Inside #if defined(RAM_CACHE)
   {    string a, b;    if( sscanf( headers, "%sDate: %*s\n%s", a, b ) == 3 )    return a+"Date: "+Roxen.http_date( predef::time(1) ) +"\r\n"+b;    return headers;    };       MY_TRACE_LEAVE ("Using entry from ram cache");    conf->hsent += sizeof(file->hs);    cache_status["protcache"] = 1; +  d=fix_date(file->hs)+d;    if( sizeof( d ) < (HTTP_BLOCKING_SIZE_THRESHOLD) )    {    TIMER_END(cache_lookup); -  +  my_fd->write(d);    }    else    {    TIMER_END(cache_lookup); -  send( fix_date(file->hs)+d ); +  send(d);    start_sender( );    }    return;    }   #ifndef RAM_CACHE_ASUME_STATIC_CONTENT    else    MY_TRACE_LEAVE (    sprintf ("Entry out of date (disk: %s, cache: mtime %d)",    st ? "mtime " + st->mtime : "gone", file->mtime));   #endif