* Added SSL Support to HttpListener

* Added SSL Option to User Server to allow logins to be done via SSL.
* Added sane handling for when Remote Admin Plugin configuration is not found
* Added some performance boosts to an area of libTerrain which was highlighted in profiling.
This commit is contained in:
Adam Frisby
2007-12-04 05:47:51 +00:00
parent 90b66f8509
commit 7d5f032203
4 changed files with 55 additions and 24 deletions

View File

@@ -45,6 +45,7 @@ namespace OpenSim.Framework.Servers
protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>();
protected Dictionary<string, IRequestHandler> m_streamHandlers = new Dictionary<string, IRequestHandler>();
protected int m_port;
protected bool m_ssl = false;
protected bool m_firstcaps = true;
public int Port
@@ -57,6 +58,12 @@ namespace OpenSim.Framework.Servers
m_port = port;
}
public BaseHttpServer(int port, bool ssl)
{
m_ssl = ssl;
BaseHttpServer(port);
}
public void AddStreamHandler(IRequestHandler handler)
{
string httpMethod = handler.HttpMethod;
@@ -252,7 +259,14 @@ namespace OpenSim.Framework.Servers
MainLog.Instance.Verbose("HTTPD", "Spawned main thread OK");
m_httpListener = new HttpListener();
m_httpListener.Prefixes.Add("http://+:" + m_port + "/");
if (!m_ssl)
{
m_httpListener.Prefixes.Add("http://+:" + m_port + "/");
}
else
{
m_httpListener.Prefixes.Add("https://+:" + m_port + "/");
}
m_httpListener.Start();
HttpListenerContext context;