aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-09-14 23:39:35 +0000
committerTeravus Ovares2008-09-14 23:39:35 +0000
commitcdced699fb497ebf3ecbbd306269dbbda337aadc (patch)
tree52090ec782b916dcf048becf8103d6a2e51a9f0e /OpenSim/Framework/Communications/Capabilities/CapsHandlers.cs
parent* This update makes configuring SSL a little easier on Windows XP. It also m... (diff)
downloadopensim-SC_OLD-cdced699fb497ebf3ecbbd306269dbbda337aadc.zip
opensim-SC_OLD-cdced699fb497ebf3ecbbd306269dbbda337aadc.tar.gz
opensim-SC_OLD-cdced699fb497ebf3ecbbd306269dbbda337aadc.tar.bz2
opensim-SC_OLD-cdced699fb497ebf3ecbbd306269dbbda337aadc.tar.xz
* Made Seed CAP response respect the SSL setting.
Diffstat (limited to '')
-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