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.399 2004/05/24 13:40:49 _cvs_stephen Exp $"; + constant cvs_version = "$Id: http.pike,v 1.400 2004/05/24 21:02:48 mani 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:113:      class AuthEmulator   // Emulate the old (rather cumbersome) authentication API   {    mixed `[]( int i )    {    User u;    switch( i )    {    case 0: -  return conf->authenticate( this_object() ); +  return conf->authenticate( this );    case 1: -  if( u = conf->authenticate( this_object() ) ) +  if( u = conf->authenticate( this ) )    return u->name();    if( realauth )    return (realauth/":")[0];       case 2: -  if( u = conf->authenticate( this_object() ) ) +  if( u = conf->authenticate( this ) )    return 0;    if( realauth )    return ((realauth/":")[1..])*":";    }    }    int `!( )    {    return !realauth;    }   }
Roxen.git/server/plugins/protocols/http.pike:834:    if(keepit    && !file->raw    && misc->connection != "close"    && ((prot == "HTTP/1.1") || (misc->connection == "keep-alive"))    && my_fd    // Is this necessary now when this function no longer is called    // from the close callback? /mast    && !catch(my_fd->query_address()) )    {    // Now.. Transfer control to a new http-object. Reset all variables etc.. -  object o = object_program(this)(0, 0, 0); +  this_program o = this_program(0, 0, 0);    o->remoteaddr = remoteaddr;    o->client = client;    o->supports = supports;    o->client_var = client_var;    o->host = host;    o->conf = conf;    o->pipe = pipe;    o->connection_misc = connection_misc;    o->kept_alive = kept_alive+1;    object fd = my_fd;
Roxen.git/server/plugins/protocols/http.pike:2145:    my_fd->set_blocking();    my_fd->close();    my_fd = 0;    disconnect();    }   }      /* Get a somewhat identical copy of this object, used when doing    * 'simulated' requests. */    - object clone_me() + this_program clone_me()   { -  object c=object_program(this)(0, port_obj, conf); +  this_program c=this_program(0, port_obj, conf);   #ifdef ID_OBJ_DEBUG    werror ("clone %O -> %O\n", this, c);   #endif       c->port_obj = port_obj;    c->conf = conf;    c->root_id = root_id;    c->time = time;    c->raw_url = raw_url;