Skip to content
This repository has been archived by the owner on Aug 19, 2018. It is now read-only.

Commit

Permalink
Merge pull request #427 from InWorldz/mdickson/urlmodule
Browse files Browse the repository at this point in the history
Added additional handlers for PUT and DELETE to llRequestURL and llRquestSecureURL
  • Loading branch information
appurist committed Mar 10, 2018
2 parents 1806d47 + 45e8719 commit 291f283
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
Expand Up @@ -169,6 +169,8 @@ public UUID RequestURL(IScriptModule engine, SceneObjectPart host, UUID itemID)
string uri = "/lslhttp/" + urlcode.ToString() + "/";
m_HttpServer.AddStreamHandler(new AsyncRequestHandler("POST", uri, AsyncHttpRequest, "HTTP-IN-POST", "Http In Request Handler (Asynch)"));
m_HttpServer.AddStreamHandler(new AsyncRequestHandler("GET", uri, AsyncHttpRequest, "HTTP-IN-GET", "Http In Request Handler (Asynch)"));
m_HttpServer.AddStreamHandler(new AsyncRequestHandler("PUT", uri, AsyncHttpRequest, "HTTP-IN-PUT", "Http In Request Handler (Asynch)"));
m_HttpServer.AddStreamHandler(new AsyncRequestHandler("DELETE", uri, AsyncHttpRequest, "HTTP-IN-DELETE", "Http In Request Handler (Asynch)"));

engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url });

Expand Down Expand Up @@ -210,8 +212,10 @@ public UUID RequestSecureURL(IScriptModule engine, SceneObjectPart host, UUID it
}

string uri = "/lslhttps/" + urlcode.ToString() + "/";
m_HttpServer.AddStreamHandler(new AsyncRequestHandler("POST", uri, AsyncHttpRequest));
m_HttpServer.AddStreamHandler(new AsyncRequestHandler("GET", uri, AsyncHttpRequest));
m_HttpServer.AddStreamHandler(new AsyncRequestHandler("POST", uri, AsyncHttpRequest, "HTTP-IN-POST", "Http In Request Handler (Asynch)"));
m_HttpServer.AddStreamHandler(new AsyncRequestHandler("GET", uri, AsyncHttpRequest, "HTTP-IN-GET", "Http In Request Handler (Asynch)"));
m_HttpServer.AddStreamHandler(new AsyncRequestHandler("PUT", uri, AsyncHttpRequest, "HTTP-IN-PUT", "Http In Request Handler (Asynch)"));
m_HttpServer.AddStreamHandler(new AsyncRequestHandler("DELETE", uri, AsyncHttpRequest, "HTTP-IN-DELETE", "Http In Request Handler (Asynch)"));

engine.PostScriptEvent(itemID, "http_request", new Object[] { urlcode.ToString(), "URL_REQUEST_GRANTED", url });

Expand Down

0 comments on commit 291f283

Please sign in to comment.