Correctly remove https:// URLs from the http server.

avinationmerge
Melanie 2013-02-17 17:43:32 +01:00
parent 4be35df5fa
commit 13fe3546c3
1 changed files with 7 additions and 1 deletions

View File

@ -50,6 +50,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
public string url; public string url;
public UUID urlcode; public UUID urlcode;
public Dictionary<UUID, RequestData> requests; public Dictionary<UUID, RequestData> requests;
public bool isSsl;
} }
public class RequestData public class RequestData
@ -184,6 +185,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
urlData.engine = engine; urlData.engine = engine;
urlData.url = url; urlData.url = url;
urlData.urlcode = urlcode; urlData.urlcode = urlcode;
urlData.isSsl = false;
urlData.requests = new Dictionary<UUID, RequestData>(); urlData.requests = new Dictionary<UUID, RequestData>();
m_UrlMap[url] = urlData; m_UrlMap[url] = urlData;
@ -229,6 +231,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
urlData.engine = engine; urlData.engine = engine;
urlData.url = url; urlData.url = url;
urlData.urlcode = urlcode; urlData.urlcode = urlcode;
urlData.isSsl = true;
urlData.requests = new Dictionary<UUID, RequestData>(); urlData.requests = new Dictionary<UUID, RequestData>();
@ -394,6 +397,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
private void RemoveUrl(UrlData data) private void RemoveUrl(UrlData data)
{ {
if (data.isSsl)
m_HttpsServer.RemoveHTTPHandler("", "/lslhttps/"+data.urlcode.ToString()+"/");
else
m_HttpServer.RemoveHTTPHandler("", "/lslhttp/"+data.urlcode.ToString()+"/"); m_HttpServer.RemoveHTTPHandler("", "/lslhttp/"+data.urlcode.ToString()+"/");
} }