aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/MessagingServer/XMPPHTTPService.cs24
1 files changed, 14 insertions, 10 deletions
diff --git a/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs b/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs
index 257e802..df3bc22 100644
--- a/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs
+++ b/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs
@@ -48,26 +48,28 @@ namespace OpenSim.Grid.MessagingServer
48 : base("GET", "/presence") 48 : base("GET", "/presence")
49 { 49 {
50 m_log.Info("[REST]: In Get Request"); 50 m_log.Info("[REST]: In Get Request");
51
51 } 52 }
52 53
53 public override byte[] Handle(string path, Stream request) 54 public override byte[] Handle(string path, Stream request)
54 { 55 {
55 string param = GetParam(path); 56 string param = GetParam(path);
56 byte[] result = new byte[] {}; 57 byte[] result = new byte[] {};
57 try 58 try
58 { 59 {
59 string[] p = param.Split(new[] {'/', '?', '&'}, StringSplitOptions.RemoveEmptyEntries); 60 string[] p = param.Split(new char[] {'/', '?', '&'}, StringSplitOptions.RemoveEmptyEntries);
60 61
61 if (p.Length > 0) 62 if (p.Length > 0)
62 { 63 {
63 LLUUID assetID = null; 64 LLUUID assetID = null;
64 65
65 if (!LLUUID.TryParse(p[0], out assetID)) 66 if (!LLUUID.TryParse(p[0], out assetID))
66 { 67 {
67 m_log.InfoFormat( 68 m_log.InfoFormat(
68 "[REST]: GET:/presence ignoring request with malformed UUID {0}", p[0]); 69 "[REST]: GET:/presence ignoring request with malformed UUID {0}", p[0]);
69 return result; 70 return result;
70 } 71 }
72
71 } 73 }
72 } 74 }
73 catch (Exception e) 75 catch (Exception e)
@@ -82,11 +84,6 @@ namespace OpenSim.Grid.MessagingServer
82 { 84 {
83 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 85 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
84 86
85 public PostXMPPStreamHandler()
86 : base("POST", "/presence")
87 {
88 }
89
90 public override byte[] Handle(string path, Stream request) 87 public override byte[] Handle(string path, Stream request)
91 { 88 {
92 string param = GetParam(path); 89 string param = GetParam(path);
@@ -100,5 +97,12 @@ namespace OpenSim.Grid.MessagingServer
100 97
101 return new byte[] {}; 98 return new byte[] {};
102 } 99 }
100
101 public PostXMPPStreamHandler()
102 : base("POST", "/presence")
103 {
104
105 }
106
103 } 107 }
104} \ No newline at end of file 108}