Branch: Tag:

2000-05-14

2000-05-14 16:10:09 by Francesco Chemolli <li@kinkie.it>

Added some throttling-related bread crumbs.

Rev: server/protocols/http.pike:1.232

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2000, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.231 2000/05/08 00:08:23 nilsson Exp $"; + constant cvs_version = "$Id: http.pike,v 1.232 2000/05/14 16:10:09 kinkie Exp $";      #define MAGIC_ERROR   
37:   #define MARK_FD(X) REQUEST_WERR(X)   #endif    + #ifdef THROTTLING_DEBUG + #undef THROTTLING_DEBUG + #define THROTTLING_DEBUG(X) werror("Throttling: "+X+"\n") + #else + #define THROTTLING_DEBUG(X) + #endif +    constant decode = MIME.decode_base64;   constant find_supports_and_vars = roxen.find_supports_and_vars;   constant version = roxen.version;
311:    pipe=roxen->fastpipe();    }    } -  if (throttle->doit) { +  if (throttle->doit) { //we are sure that pipe is really a slowpipe.    throttle->rate=max(throttle->rate,    conf->query("req_throttle_min")); //if conf=0 => throttle=0    pipe->throttle(throttle->rate,    (int)(throttle->rate*conf->query("req_throttle_depth_mult")),    0); -  +  THROTTLING_DEBUG("throtting request at "+throttle->rate);    }    if (conf && conf->throttler) {    pipe->assign_throttler(conf->throttler);