aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs16
-rw-r--r--OpenSim/Framework/UserConfig.cs7
2 files changed, 22 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index aa6d315..81829c4 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -45,6 +45,7 @@ namespace OpenSim.Framework.Servers
45 protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>(); 45 protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>();
46 protected Dictionary<string, IRequestHandler> m_streamHandlers = new Dictionary<string, IRequestHandler>(); 46 protected Dictionary<string, IRequestHandler> m_streamHandlers = new Dictionary<string, IRequestHandler>();
47 protected int m_port; 47 protected int m_port;
48 protected bool m_ssl = false;
48 protected bool m_firstcaps = true; 49 protected bool m_firstcaps = true;
49 50
50 public int Port 51 public int Port
@@ -57,6 +58,12 @@ namespace OpenSim.Framework.Servers
57 m_port = port; 58 m_port = port;
58 } 59 }
59 60
61 public BaseHttpServer(int port, bool ssl)
62 {
63 m_ssl = ssl;
64 BaseHttpServer(port);
65 }
66
60 public void AddStreamHandler(IRequestHandler handler) 67 public void AddStreamHandler(IRequestHandler handler)
61 { 68 {
62 string httpMethod = handler.HttpMethod; 69 string httpMethod = handler.HttpMethod;
@@ -252,7 +259,14 @@ namespace OpenSim.Framework.Servers
252 MainLog.Instance.Verbose("HTTPD", "Spawned main thread OK"); 259 MainLog.Instance.Verbose("HTTPD", "Spawned main thread OK");
253 m_httpListener = new HttpListener(); 260 m_httpListener = new HttpListener();
254 261
255 m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); 262 if (!m_ssl)
263 {
264 m_httpListener.Prefixes.Add("http://+:" + m_port + "/");
265 }
266 else
267 {
268 m_httpListener.Prefixes.Add("https://+:" + m_port + "/");
269 }
256 m_httpListener.Start(); 270 m_httpListener.Start();
257 271
258 HttpListenerContext context; 272 HttpListenerContext context;
diff --git a/OpenSim/Framework/UserConfig.cs b/OpenSim/Framework/UserConfig.cs
index 4c6b3b8..1cc00c7 100644
--- a/OpenSim/Framework/UserConfig.cs
+++ b/OpenSim/Framework/UserConfig.cs
@@ -43,7 +43,9 @@ namespace OpenSim.Framework
43 public string DatabaseProvider = ""; 43 public string DatabaseProvider = "";
44 44
45 public static uint DefaultHttpPort = 8002; 45 public static uint DefaultHttpPort = 8002;
46 public static bool DefaultHttpSSL = false;
46 public uint HttpPort = DefaultHttpPort; 47 public uint HttpPort = DefaultHttpPort;
48 public bool HttpSSL = DefaultHttpSSL;
47 public uint DefaultX = 1000; 49 public uint DefaultX = 1000;
48 public uint DefaultY = 1000; 50 public uint DefaultY = 1000;
49 51
@@ -80,6 +82,8 @@ namespace OpenSim.Framework
80 82
81 configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, 83 configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
82 "Http Listener port", DefaultHttpPort.ToString(), false); 84 "Http Listener port", DefaultHttpPort.ToString(), false);
85 configMember.addConfigurationOption("http_ssl", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
86 "Use SSL? true/false", DefaultHttpSSL.ToString(), false);
83 configMember.addConfigurationOption("default_X", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, 87 configMember.addConfigurationOption("default_X", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
84 "Known good region X", "1000", false); 88 "Known good region X", "1000", false);
85 configMember.addConfigurationOption("default_Y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, 89 configMember.addConfigurationOption("default_Y", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
@@ -111,6 +115,9 @@ namespace OpenSim.Framework
111 case "http_port": 115 case "http_port":
112 HttpPort = (uint) configuration_result; 116 HttpPort = (uint) configuration_result;
113 break; 117 break;
118 case "http_ssl":
119 HttpSSL = (bool)configuration_result;
120 break;
114 case "default_X": 121 case "default_X":
115 DefaultX = (uint)configuration_result; 122 DefaultX = (uint)configuration_result;
116 break; 123 break;