diff options
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index bd8b681..01d427e 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | |||
@@ -108,7 +108,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
108 | new Dictionary<string, WebSocketRequestDelegate>(); | 108 | new Dictionary<string, WebSocketRequestDelegate>(); |
109 | 109 | ||
110 | protected uint m_port; | 110 | protected uint m_port; |
111 | protected uint m_sslport; | ||
112 | protected bool m_ssl; | 111 | protected bool m_ssl; |
113 | private X509Certificate2 m_cert; | 112 | private X509Certificate2 m_cert; |
114 | protected string m_SSLCommonName = ""; | 113 | protected string m_SSLCommonName = ""; |
@@ -120,9 +119,14 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
120 | 119 | ||
121 | public PollServiceRequestManager PollServiceRequestManager { get; private set; } | 120 | public PollServiceRequestManager PollServiceRequestManager { get; private set; } |
122 | 121 | ||
122 | public string Protocol | ||
123 | { | ||
124 | get { return m_ssl ? "https://" : "http://"; } | ||
125 | } | ||
126 | |||
123 | public uint SSLPort | 127 | public uint SSLPort |
124 | { | 128 | { |
125 | get { return m_sslport; } | 129 | get { return m_port; } |
126 | } | 130 | } |
127 | 131 | ||
128 | public string SSLCommonName | 132 | public string SSLCommonName |
@@ -184,7 +188,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
184 | } | 188 | } |
185 | } | 189 | } |
186 | 190 | ||
187 | public BaseHttpServer(uint port, bool ssl, uint sslport, string CN, string CPath, string CPass) | 191 | public BaseHttpServer(uint port, bool ssl, string CN, string CPath, string CPass) |
188 | { | 192 | { |
189 | m_port = port; | 193 | m_port = port; |
190 | if (ssl) | 194 | if (ssl) |
@@ -200,7 +204,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
200 | m_certCN= ""; | 204 | m_certCN= ""; |
201 | 205 | ||
202 | m_ssl = true; | 206 | m_ssl = true; |
203 | m_sslport = sslport; | ||
204 | load_cert(CPath, CPass); | 207 | load_cert(CPath, CPass); |
205 | 208 | ||
206 | if(!CheckSSLCertHost(CN)) | 209 | if(!CheckSSLCertHost(CN)) |
@@ -224,7 +227,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
224 | if(m_cert.Issuer == m_cert.Subject ) | 227 | if(m_cert.Issuer == m_cert.Subject ) |
225 | m_log.Warn("Self signed certificate. Http clients need to allow this"); | 228 | m_log.Warn("Self signed certificate. Http clients need to allow this"); |
226 | m_ssl = true; | 229 | m_ssl = true; |
227 | m_sslport = port; | ||
228 | } | 230 | } |
229 | else | 231 | else |
230 | m_ssl = false; | 232 | m_ssl = false; |
@@ -2101,7 +2103,7 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
2101 | catch (Exception e) | 2103 | catch (Exception e) |
2102 | { | 2104 | { |
2103 | m_log.Error("[BASE HTTP SERVER]: Error - " + e.Message); | 2105 | m_log.Error("[BASE HTTP SERVER]: Error - " + e.Message); |
2104 | m_log.Error("[BASE HTTP SERVER]: Tip: Do you have permission to listen on port " + m_port + ", " + m_sslport + "?"); | 2106 | m_log.Error("[BASE HTTP SERVER]: Tip: Do you have permission to listen on port " + m_port + "?"); |
2105 | 2107 | ||
2106 | // We want this exception to halt the entire server since in current configurations we aren't too | 2108 | // We want this exception to halt the entire server since in current configurations we aren't too |
2107 | // useful without inbound HTTP. | 2109 | // useful without inbound HTTP. |