mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
* 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:
@@ -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;
|
||||
|
||||
@@ -43,7 +43,9 @@ namespace OpenSim.Framework
|
||||
public string DatabaseProvider = "";
|
||||
|
||||
public static uint DefaultHttpPort = 8002;
|
||||
public static bool DefaultHttpSSL = false;
|
||||
public uint HttpPort = DefaultHttpPort;
|
||||
public bool HttpSSL = DefaultHttpSSL;
|
||||
public uint DefaultX = 1000;
|
||||
public uint DefaultY = 1000;
|
||||
|
||||
@@ -80,6 +82,8 @@ namespace OpenSim.Framework
|
||||
|
||||
configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
|
||||
"Http Listener port", DefaultHttpPort.ToString(), false);
|
||||
configMember.addConfigurationOption("http_ssl", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
|
||||
"Use SSL? true/false", DefaultHttpSSL.ToString(), false);
|
||||
configMember.addConfigurationOption("default_X", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
|
||||
"Known good region X", "1000", false);
|
||||
configMember.addConfigurationOption("default_Y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
|
||||
@@ -111,6 +115,9 @@ namespace OpenSim.Framework
|
||||
case "http_port":
|
||||
HttpPort = (uint) configuration_result;
|
||||
break;
|
||||
case "http_ssl":
|
||||
HttpSSL = (bool)configuration_result;
|
||||
break;
|
||||
case "default_X":
|
||||
DefaultX = (uint)configuration_result;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user