From 45e8719bf30e55becc66863c288ab937e81fd815 Mon Sep 17 00:00:00 2001 From: Mike Dickson Date: Sat, 10 Mar 2018 12:22:57 -0500 Subject: [PATCH] Added additional handlers for PUT and DELETE to llRequestURL and llRequestSecureURL --- OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs index bba3e079..363dfe21 100644 --- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs @@ -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 }); @@ -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 });