aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs29
1 files changed, 14 insertions, 15 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index af292c6..bd8b681 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -111,7 +111,6 @@ namespace OpenSim.Framework.Servers.HttpServer
111 protected uint m_sslport; 111 protected uint m_sslport;
112 protected bool m_ssl; 112 protected bool m_ssl;
113 private X509Certificate2 m_cert; 113 private X509Certificate2 m_cert;
114 protected bool m_firstcaps = true;
115 protected string m_SSLCommonName = ""; 114 protected string m_SSLCommonName = "";
116 protected List<string> m_certNames = new List<string>(); 115 protected List<string> m_certNames = new List<string>();
117 protected List<string> m_certIPs = new List<string>(); 116 protected List<string> m_certIPs = new List<string>();
@@ -152,11 +151,6 @@ namespace OpenSim.Framework.Servers.HttpServer
152 m_port = port; 151 m_port = port;
153 } 152 }
154 153
155 public BaseHttpServer(uint port, bool ssl) : this (port)
156 {
157 m_ssl = ssl;
158 }
159
160 private void load_cert(string CPath, string CPass) 154 private void load_cert(string CPath, string CPass)
161 { 155 {
162 try 156 try
@@ -216,21 +210,24 @@ namespace OpenSim.Framework.Servers.HttpServer
216 210
217 if(m_cert.Issuer == m_cert.Subject ) 211 if(m_cert.Issuer == m_cert.Subject )
218 m_log.Warn("Self signed certificate. Clients need to allow this (some viewers debug option NoVerifySSLcert must be set to true"); 212 m_log.Warn("Self signed certificate. Clients need to allow this (some viewers debug option NoVerifySSLcert must be set to true");
219
220
221 } 213 }
222 else 214 else
223 m_ssl = false; 215 m_ssl = false;
224 } 216 }
225 217
226 public BaseHttpServer(uint port, bool ssl, string CPath, string CPass) : this (port, ssl) 218 public BaseHttpServer(uint port, bool ssl, string CPath, string CPass)
227 { 219 {
228 if (m_ssl) 220 m_port = port;
221 if (ssl)
229 { 222 {
230 load_cert(CPath, CPass); 223 load_cert(CPath, CPass);
231 if(m_cert.Issuer == m_cert.Subject ) 224 if(m_cert.Issuer == m_cert.Subject )
232 m_log.Warn("Self signed certificate. Http clients need to allow this"); 225 m_log.Warn("Self signed certificate. Http clients need to allow this");
226 m_ssl = true;
227 m_sslport = port;
233 } 228 }
229 else
230 m_ssl = false;
234 } 231 }
235 232
236 static bool MatchDNS (string hostname, string dns) 233 static bool MatchDNS (string hostname, string dns)
@@ -2038,7 +2035,7 @@ namespace OpenSim.Framework.Servers.HttpServer
2038 2035
2039 public void Start() 2036 public void Start()
2040 { 2037 {
2041 Start(true); 2038 Start(true,true);
2042 } 2039 }
2043 2040
2044 /// <summary> 2041 /// <summary>
@@ -2048,7 +2045,7 @@ namespace OpenSim.Framework.Servers.HttpServer
2048 /// If true then poll responses are performed asynchronsly. 2045 /// If true then poll responses are performed asynchronsly.
2049 /// Option exists to allow regression tests to perform processing synchronously. 2046 /// Option exists to allow regression tests to perform processing synchronously.
2050 /// </param> 2047 /// </param>
2051 public void Start(bool performPollResponsesAsync) 2048 public void Start(bool performPollResponsesAsync, bool runPool)
2052 { 2049 {
2053 m_log.InfoFormat( 2050 m_log.InfoFormat(
2054 "[BASE HTTP SERVER]: Starting {0} server on port {1}", UseSSL ? "HTTPS" : "HTTP", Port); 2051 "[BASE HTTP SERVER]: Starting {0} server on port {1}", UseSSL ? "HTTPS" : "HTTP", Port);
@@ -2086,9 +2083,11 @@ namespace OpenSim.Framework.Servers.HttpServer
2086 m_httpListener2.Start(64); 2083 m_httpListener2.Start(64);
2087 2084
2088 // Long Poll Service Manager with 3 worker threads a 25 second timeout for no events 2085 // Long Poll Service Manager with 3 worker threads a 25 second timeout for no events
2089 2086 if(runPool)
2090 PollServiceRequestManager = new PollServiceRequestManager(this, performPollResponsesAsync, 2, 25000); 2087 {
2091 PollServiceRequestManager.Start(); 2088 PollServiceRequestManager = new PollServiceRequestManager(this, performPollResponsesAsync, 2, 25000);
2089 PollServiceRequestManager.Start();
2090 }
2092 2091
2093 HTTPDRunning = true; 2092 HTTPDRunning = true;
2094 2093