aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs')
-rw-r--r--OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs28
1 files changed, 27 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs b/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs
index 4a3d00f..ed31c45 100644
--- a/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs
+++ b/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs
@@ -42,6 +42,7 @@ namespace OpenSim.Framework.Communications.Capabilities
42 private BaseHttpServer m_httpListener; 42 private BaseHttpServer m_httpListener;
43 private string m_httpListenerHostName; 43 private string m_httpListenerHostName;
44 private uint m_httpListenerPort; 44 private uint m_httpListenerPort;
45 private bool m_useSSL = false;
45 46
46 /// <summary></summary> 47 /// <summary></summary>
47 /// CapsHandlers is a cap handler container but also takes 48 /// CapsHandlers is a cap handler container but also takes
@@ -53,10 +54,30 @@ namespace OpenSim.Framework.Communications.Capabilities
53 /// server</param> 54 /// server</param>
54 /// <param name="httpListenerPort">HTTP port</param> 55 /// <param name="httpListenerPort">HTTP port</param>
55 public CapsHandlers(BaseHttpServer httpListener, string httpListenerHostname, uint httpListenerPort) 56 public CapsHandlers(BaseHttpServer httpListener, string httpListenerHostname, uint httpListenerPort)
57 : this (httpListener,httpListenerHostname,httpListenerPort, false)
58 {
59 }
60
61 /// <summary></summary>
62 /// CapsHandlers is a cap handler container but also takes
63 /// care of adding and removing cap handlers to and from the
64 /// supplied BaseHttpServer.
65 /// </summary>
66 /// <param name="httpListener">base HTTP server</param>
67 /// <param name="httpListenerHostname">host name of the HTTP
68 /// server</param>
69 /// <param name="httpListenerPort">HTTP port</param>
70 public CapsHandlers(BaseHttpServer httpListener, string httpListenerHostname, uint httpListenerPort, bool https)
56 { 71 {
57 m_httpListener = httpListener; 72 m_httpListener = httpListener;
58 m_httpListenerHostName = httpListenerHostname; 73 m_httpListenerHostName = httpListenerHostname;
59 m_httpListenerPort = httpListenerPort; 74 m_httpListenerPort = httpListenerPort;
75 m_useSSL = https;
76 if (m_useSSL)
77 {
78 m_httpListenerHostName = httpListener.SSLCommonName;
79 m_httpListenerPort = httpListener.SSLPort;
80 }
60 } 81 }
61 82
62 /// <summary> 83 /// <summary>
@@ -130,7 +151,12 @@ namespace OpenSim.Framework.Communications.Capabilities
130 get 151 get
131 { 152 {
132 Hashtable caps = new Hashtable(); 153 Hashtable caps = new Hashtable();
133 string baseUrl = "http://" + m_httpListenerHostName + ":" + m_httpListenerPort.ToString(); 154 string protocol = "http://";
155
156 if (m_useSSL)
157 protocol = "https://";
158
159 string baseUrl = protocol + m_httpListenerHostName + ":" + m_httpListenerPort.ToString();
134 foreach (string capsName in m_capsHandlers.Keys) 160 foreach (string capsName in m_capsHandlers.Keys)
135 { 161 {
136 // skip SEED cap 162 // skip SEED cap