1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
// This is a roxen protocol module. 
// Copyright © 2001, Roxen IS. 
 
inherit Protocol; 
constant supports_ipless = 1; 
constant name = "http"; 
constant prot_name = "http"; 
constant requesthandlerfile = "plugins/protocols/http.pike"; 
constant default_port = 80; 
 
int set_cookie, set_cookie_only_once; 
int minimum_byterate; 
 
void fix_cvars( Variable.Variable a ) 
{ 
  set_cookie = query( "set_cookie" ); 
  set_cookie_only_once = query( "set_cookie_only_once" ); 
  minimum_byterate = query( "minimum_bitrate" ) / 8; 
} 
 
void create( mixed ... args ) 
{ 
  roxen.set_up_http_variables( this_object() ); 
  variables[ "set_cookie" ]->set_changed_callback( fix_cvars ); 
  variables[ "set_cookie_only_once" ]->set_changed_callback( fix_cvars ); 
  variables[ "minimum_bitrate" ]->set_changed_callback( fix_cvars ); 
  fix_cvars(0); 
  ::create( @args ); 
}