aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Common/OpenSim.Servers
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Common/OpenSim.Servers/BaseHttpServer.cs20
-rw-r--r--Common/OpenSim.Servers/CheckSumServer.cs7
2 files changed, 23 insertions, 4 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);
diff --git a/Common/OpenSim.Servers/CheckSumServer.cs b/Common/OpenSim.Servers/CheckSumServer.cs
index 14ac11b..a359205 100644
--- a/Common/OpenSim.Servers/CheckSumServer.cs
+++ b/Common/OpenSim.Servers/CheckSumServer.cs
@@ -42,7 +42,7 @@ using OpenSim.Framework.Console;
42 42
43namespace OpenSim.Servers 43namespace OpenSim.Servers
44{ 44{
45 public class CheckSumServer : UDPServerBase 45/* public class CheckSumServer : UDPServerBase
46 { 46 {
47 //protected ConsoleBase m_log; 47 //protected ConsoleBase m_log;
48 48
@@ -79,7 +79,7 @@ namespace OpenSim.Servers
79 SecuredTemplateChecksumRequestPacket checkrequest = new SecuredTemplateChecksumRequestPacket(); 79 SecuredTemplateChecksumRequestPacket checkrequest = new SecuredTemplateChecksumRequestPacket();
80 checkrequest.TokenBlock.Token = checksum.TokenBlock.Token; 80 checkrequest.TokenBlock.Token = checksum.TokenBlock.Token;
81 this.SendPacket(checkrequest, epSender); 81 this.SendPacket(checkrequest, epSender);
82 */ 82
83 } 83 }
84 else if (packet.Type == PacketType.TemplateChecksumReply) 84 else if (packet.Type == PacketType.TemplateChecksumReply)
85 { 85 {
@@ -136,5 +136,6 @@ namespace OpenSim.Servers
136 { 136 {
137 this.Server.SendTo(buffer, size, flags, endp); 137 this.Server.SendTo(buffer, size, flags, endp);
138 } 138 }
139 } 139 *
140 }*/
140} \ No newline at end of file 141} \ No newline at end of file