diff options
Diffstat (limited to '')
-rw-r--r-- | Common/OpenSim.Servers/BaseHttpServer.cs | 20 |
1 files changed, 19 insertions, 1 deletions
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 | |||
88 | return false; | 88 | return false; |
89 | } | 89 | } |
90 | 90 | ||
91 | public bool RemoveRestHandler(string method, string path) | ||
92 | { | ||
93 | string methodKey = String.Format("{0}: {1}", method, path); | ||
94 | if (this.m_restHandlers.ContainsKey(methodKey)) | ||
95 | { | ||
96 | this.m_restHandlers.Remove(methodKey); | ||
97 | return true; | ||
98 | } | ||
99 | return false; | ||
100 | } | ||
101 | |||
91 | public bool AddXmlRPCHandler(string method, XmlRpcMethod handler) | 102 | public bool AddXmlRPCHandler(string method, XmlRpcMethod handler) |
92 | { | 103 | { |
93 | if (!this.m_rpcHandlers.ContainsKey(method)) | 104 | if (!this.m_rpcHandlers.ContainsKey(method)) |
@@ -213,7 +224,7 @@ namespace OpenSim.Servers | |||
213 | //Console.WriteLine(requestBody); | 224 | //Console.WriteLine(requestBody); |
214 | 225 | ||
215 | string responseString = ""; | 226 | string responseString = ""; |
216 | //Console.WriteLine("new request " + request.ContentType); | 227 | Console.WriteLine("new request " + request.ContentType +" at "+ request.RawUrl); |
217 | switch (request.ContentType) | 228 | switch (request.ContentType) |
218 | { | 229 | { |
219 | case "text/xml": | 230 | case "text/xml": |
@@ -232,6 +243,13 @@ namespace OpenSim.Servers | |||
232 | response.AddHeader("Content-type", "application/xml"); | 243 | response.AddHeader("Content-type", "application/xml"); |
233 | break; | 244 | break; |
234 | 245 | ||
246 | case "application/octet-stream": | ||
247 | // probably LLSD we hope, otherwise it should be ignored by the parser | ||
248 | // responseString = ParseLLSDXML(requestBody); | ||
249 | responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod); | ||
250 | response.AddHeader("Content-type", "application/xml"); | ||
251 | break; | ||
252 | |||
235 | case "application/x-www-form-urlencoded": | 253 | case "application/x-www-form-urlencoded": |
236 | // a form data POST so send to the REST parser | 254 | // a form data POST so send to the REST parser |
237 | responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod); | 255 | responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod); |