From 38a800400ae8c61eef0770b8c49aa6e637478e58 Mon Sep 17 00:00:00 2001 From: MW Date: Sun, 24 Jun 2007 15:24:02 +0000 Subject: Disabled the CheckSum Server as it seems that isn't used by viewer 1.18. Started to add support for asset uploads over CAPS (the asset is uploaded but seems to come out corrupt). Started to cleanup/rewrite the AssetCache. Fixed bug in MapBlock requests, where data for some regions wasn't being sent. Renamed PrimData's Texture to TextureEntry. most likely a few other small changes. --- Common/OpenSim.Servers/BaseHttpServer.cs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'Common/OpenSim.Servers/BaseHttpServer.cs') diff --git a/Common/OpenSim.Servers/BaseHttpServer.cs b/Common/OpenSim.Servers/BaseHttpServer.cs index 1071692..55826f6 100644 --- a/Common/OpenSim.Servers/BaseHttpServer.cs +++ b/Common/OpenSim.Servers/BaseHttpServer.cs @@ -88,6 +88,17 @@ namespace OpenSim.Servers return false; } + public bool RemoveRestHandler(string method, string path) + { + string methodKey = String.Format("{0}: {1}", method, path); + if (this.m_restHandlers.ContainsKey(methodKey)) + { + this.m_restHandlers.Remove(methodKey); + return true; + } + return false; + } + public bool AddXmlRPCHandler(string method, XmlRpcMethod handler) { if (!this.m_rpcHandlers.ContainsKey(method)) @@ -213,7 +224,7 @@ namespace OpenSim.Servers //Console.WriteLine(requestBody); string responseString = ""; - //Console.WriteLine("new request " + request.ContentType); + Console.WriteLine("new request " + request.ContentType +" at "+ request.RawUrl); switch (request.ContentType) { case "text/xml": @@ -232,6 +243,13 @@ namespace OpenSim.Servers response.AddHeader("Content-type", "application/xml"); break; + case "application/octet-stream": + // probably LLSD we hope, otherwise it should be ignored by the parser + // responseString = ParseLLSDXML(requestBody); + responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod); + response.AddHeader("Content-type", "application/xml"); + break; + case "application/x-www-form-urlencoded": // a form data POST so send to the REST parser responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod); -- cgit v1.1