Esempio n. 1
0
 /// <summary>
 /// Each HTTP processor object handles one client.  If Keep-Alive is enabled then this
 /// object will be reused for subsequent requests until the client breaks keep-alive.
 /// This usually happens when it times out.  Because this could easily lead to a DoS
 /// attack, we keep track of the number of open processors and only allow 100 to be
 /// persistent active at any one time.  Additionally, we do not allow more than 500
 /// outstanding requests.
 /// </summary>
 /// <param name="docRoot">Root-Directory of the HTTP Server</param>
 /// <param name="s">the Socket to work with</param>
 /// <param name="webserver">the "master" HttpServer Object of this Client</param>
 public HttpProcessor(Socket s, Settings.Settings Settings)
 {
     internalSettings = Settings;
     this.s = s;
     docRootFile = new FileInfo(internalSettings.HTTP.DocumentRoot);
     headers = new Hashtable();
     Template_Processor = new TemplateProcessor(internalSettings);
 }
Esempio n. 2
0
 /// <summary>
 /// Each HTTP processor object handles one client.  If Keep-Alive is enabled then this
 /// object will be reused for subsequent requests until the client breaks keep-alive.
 /// This usually happens when it times out.  Because this could easily lead to a DoS
 /// attack, we keep track of the number of open processors and only allow 100 to be
 /// persistent active at any one time.  Additionally, we do not allow more than 500
 /// outstanding requests.
 /// </summary>
 /// <param name="docRoot">Root-Directory of the HTTP Server</param>
 /// <param name="s">the Socket to work with</param>
 /// <param name="webserver">the "master" HttpServer Object of this Client</param>
 public HttpProcessor(Socket s)
 {
     //internalSettings = Settings;
     this.s = s;
     docRootFile = new FileInfo(FFN_Switcher.Properties.Settings.Default.WebserverDocumentRoot);
     headers = new Hashtable();
     Template_Processor = new TemplateProcessor();
 }