Branch: Tag:

1999-11-24

1999-11-24 19:12:12 by Per Hedbor <ph@opera.com>

cache the fast and slowpipe programs (it is somewhat unnessesary to stat them for each request). :-)

Rev: server/base_server/roxen.pike:1.358
Rev: server/protocols/http.pike:1.170

1:   // This is a roxen module.   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 1998, Idonex AB. - // $Id: http.pike,v 1.169 1999/11/19 06:55:52 per Exp $ + // $Id: http.pike,v 1.170 1999/11/24 19:12:12 per Exp $      #define MAGIC_ERROR      #ifdef MAGIC_ERROR   inherit "highlight_pike";   #endif - constant cvs_version = "$Id: http.pike,v 1.169 1999/11/19 06:55:52 per Exp $"; + constant cvs_version = "$Id: http.pike,v 1.170 1999/11/24 19:12:12 per Exp $";   // HTTP protocol module.   #include <config.h>   private inherit "roxenlib";
193:    throttle->doit=0;    if(!pipe) {    if (throttle->doit || (conf && conf->throttler)) { -  pipe=((program)"slowpipe")(); +  pipe=roxen->slowpipe();    } else { -  pipe=((program)"fastpipe")(); +  pipe=roxen->fastpipe();    }    }    if (throttle->doit) {