aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs')
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs22
1 files changed, 5 insertions, 17 deletions
diff --git a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs
index 0aa2729..37b47ed 100644
--- a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
68 m_log.ErrorFormat("[HGFRIENDS HANDLER]: TheService is null!"); 68 m_log.ErrorFormat("[HGFRIENDS HANDLER]: TheService is null!");
69 } 69 }
70 70
71 public override byte[] Handle(string path, Stream requestData, 71 protected override byte[] ProcessRequest(string path, Stream requestData,
72 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) 72 IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
73 { 73 {
74 StreamReader sr = new StreamReader(requestData); 74 StreamReader sr = new StreamReader(requestData);
@@ -335,7 +335,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
335 335
336 rootElement.AppendChild(result); 336 rootElement.AppendChild(result);
337 337
338 return DocToBytes(doc); 338 return Util.DocToBytes(doc);
339 } 339 }
340 340
341 private byte[] SuccessResult(string value) 341 private byte[] SuccessResult(string value)
@@ -362,7 +362,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
362 362
363 rootElement.AppendChild(message); 363 rootElement.AppendChild(message);
364 364
365 return DocToBytes(doc); 365 return Util.DocToBytes(doc);
366 } 366 }
367 367
368 368
@@ -395,7 +395,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
395 395
396 rootElement.AppendChild(message); 396 rootElement.AppendChild(message);
397 397
398 return DocToBytes(doc); 398 return Util.DocToBytes(doc);
399 } 399 }
400 400
401 private byte[] BoolResult(bool value) 401 private byte[] BoolResult(bool value)
@@ -417,21 +417,9 @@ namespace OpenSim.Server.Handlers.Hypergrid
417 417
418 rootElement.AppendChild(result); 418 rootElement.AppendChild(result);
419 419
420 return DocToBytes(doc); 420 return Util.DocToBytes(doc);
421 } 421 }
422 422
423 private byte[] DocToBytes(XmlDocument doc)
424 {
425 MemoryStream ms = new MemoryStream();
426 XmlTextWriter xw = new XmlTextWriter(ms, null);
427 xw.Formatting = Formatting.Indented;
428 doc.WriteTo(xw);
429 xw.Flush();
430
431 return ms.ToArray();
432 }
433
434
435 #endregion 423 #endregion
436 } 424 }
437} 425}