Now, fix the slash issue the right way. Our URLs now work like SL's
parent
721d8a7298
commit
86a82e6ecb
|
@ -142,7 +142,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_DENIED", "" });
|
engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_DENIED", "" });
|
||||||
return urlcode;
|
return urlcode;
|
||||||
}
|
}
|
||||||
string url = "http://" + m_ExternalHostNameForLSL + ":" + m_HttpServer.Port.ToString() + "/lslhttp/" + urlcode.ToString() + "/";
|
string url = "http://" + m_ExternalHostNameForLSL + ":" + m_HttpServer.Port.ToString() + "/lslhttp/" + urlcode.ToString();
|
||||||
|
|
||||||
UrlData urlData = new UrlData();
|
UrlData urlData = new UrlData();
|
||||||
urlData.hostID = host.UUID;
|
urlData.hostID = host.UUID;
|
||||||
|
@ -152,10 +152,9 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
urlData.urlcode = urlcode;
|
urlData.urlcode = urlcode;
|
||||||
urlData.requests = new Dictionary<UUID, RequestData>();
|
urlData.requests = new Dictionary<UUID, RequestData>();
|
||||||
|
|
||||||
|
|
||||||
m_UrlMap[url] = urlData;
|
m_UrlMap[url] = urlData;
|
||||||
|
|
||||||
string uri = "/lslhttp/" + urlcode.ToString() + "/";
|
string uri = "/lslhttp/" + urlcode.ToString();
|
||||||
|
|
||||||
m_HttpServer.AddPollServiceHTTPHandler(uri,HandleHttpPoll,
|
m_HttpServer.AddPollServiceHTTPHandler(uri,HandleHttpPoll,
|
||||||
new PollServiceEventArgs(HttpRequestHandler,HasEvents, GetEvents, NoEvents,
|
new PollServiceEventArgs(HttpRequestHandler,HasEvents, GetEvents, NoEvents,
|
||||||
|
@ -386,6 +385,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HttpRequestHandler(UUID requestID, Hashtable request)
|
public void HttpRequestHandler(UUID requestID, Hashtable request)
|
||||||
{
|
{
|
||||||
lock (request)
|
lock (request)
|
||||||
|
@ -400,8 +400,8 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
|
|
||||||
int pos1 = uri.IndexOf("/");// /lslhttp
|
int pos1 = uri.IndexOf("/");// /lslhttp
|
||||||
int pos2 = uri.IndexOf("/", pos1 + 1);// /lslhttp/
|
int pos2 = uri.IndexOf("/", pos1 + 1);// /lslhttp/
|
||||||
int pos3 = uri.IndexOf("/", pos2 + 1);// /lslhttp/<UUID>/
|
int pos3 = pos2 + 37; // /lslhttp/urlcode
|
||||||
string uri_tmp = uri.Substring(0, pos3 + 1);
|
string uri_tmp = uri.Substring(0, pos3);
|
||||||
//HTTP server code doesn't provide us with QueryStrings
|
//HTTP server code doesn't provide us with QueryStrings
|
||||||
string pathInfo;
|
string pathInfo;
|
||||||
string queryString;
|
string queryString;
|
||||||
|
|
Loading…
Reference in New Issue