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

version» Context lines:

Roxen.git/server/plugins/protocols/http.pike:1:   // This is a roxen protocol module.   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2001, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.379 2002/07/05 02:10:36 nilsson Exp $"; + constant cvs_version = "$Id: http.pike,v 1.380 2002/07/17 17:57:22 nilsson Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR      // HTTP protocol module.   #include <config.h>   #define TIMER_PREFIX "http:"   #include <timers.h>      inherit RequestID;   
Roxen.git/server/plugins/protocols/http.pike:1007:    };    }    disconnect();   }      static void do_timeout()   {    int elapsed = predef::time(1)-time;    if(time && elapsed >= 30)    { +  REQUEST_WERR("HTTP: Connection timed out. Closing.");    MARK_FD("HTTP timeout");    end();    } else {    // premature call_out... *¤#!"    call_out(do_timeout, 10);    MARK_FD("HTTP premature timeout");    }   }      string link_to(string file, int line, string fun, int eid, int qq)
Roxen.git/server/plugins/protocols/http.pike:1908:   void got_data(mixed fooid, string s)   {    REQUEST_WERR(sprintf("HTTP: Got %O", s));       if(wanted_data)    {    data += s;    if(strlen(s) + have_data < wanted_data)    {    have_data += strlen(s); +  // Reset timeout. +  remove_call_out(do_timeout); +  call_out(do_timeout, 90);    REQUEST_WERR("HTTP: We want more data.");    return;    }    }       if (mixed err = catch {    MARK_FD("HTTP got data");    raw += s;       // The port has been closed, but old (probably keep-alive)