aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs
diff options
context:
space:
mode:
authorAdam Frisby2008-05-01 16:41:01 +0000
committerAdam Frisby2008-05-01 16:41:01 +0000
commitfc6c4dc399587f6f920d3f0759b1bd7a8b9b4ac8 (patch)
tree90a4799fa43e3761ffbe669d1d87837933d8db53 /OpenSim/Grid/MessagingServer/XMPPHTTPService.cs
parent* Deletes my EventReader ScriptRewriter. It isn't required to rewrite the sc... (diff)
downloadopensim-SC_OLD-fc6c4dc399587f6f920d3f0759b1bd7a8b9b4ac8.zip
opensim-SC_OLD-fc6c4dc399587f6f920d3f0759b1bd7a8b9b4ac8.tar.gz
opensim-SC_OLD-fc6c4dc399587f6f920d3f0759b1bd7a8b9b4ac8.tar.bz2
opensim-SC_OLD-fc6c4dc399587f6f920d3f0759b1bd7a8b9b4ac8.tar.xz
* Cleaning code still.
Diffstat (limited to 'OpenSim/Grid/MessagingServer/XMPPHTTPService.cs')
-rw-r--r--OpenSim/Grid/MessagingServer/XMPPHTTPService.cs24
1 files changed, 10 insertions, 14 deletions
diff --git a/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs b/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs
index df3bc22..257e802 100644
--- a/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs
+++ b/OpenSim/Grid/MessagingServer/XMPPHTTPService.cs
@@ -48,28 +48,26 @@ 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
52 } 51 }
53 52
54 public override byte[] Handle(string path, Stream request) 53 public override byte[] Handle(string path, Stream request)
55 { 54 {
56 string param = GetParam(path); 55 string param = GetParam(path);
57 byte[] result = new byte[] {}; 56 byte[] result = new byte[] {};
58 try 57 try
59 { 58 {
60 string[] p = param.Split(new char[] {'/', '?', '&'}, StringSplitOptions.RemoveEmptyEntries); 59 string[] p = param.Split(new[] {'/', '?', '&'}, StringSplitOptions.RemoveEmptyEntries);
61 60
62 if (p.Length > 0) 61 if (p.Length > 0)
63 { 62 {
64 LLUUID assetID = null; 63 LLUUID assetID = null;
65 64
66 if (!LLUUID.TryParse(p[0], out assetID)) 65 if (!LLUUID.TryParse(p[0], out assetID))
67 { 66 {
68 m_log.InfoFormat( 67 m_log.InfoFormat(
69 "[REST]: GET:/presence ignoring request with malformed UUID {0}", p[0]); 68 "[REST]: GET:/presence ignoring request with malformed UUID {0}", p[0]);
70 return result; 69 return result;
71 } 70 }
72
73 } 71 }
74 } 72 }
75 catch (Exception e) 73 catch (Exception e)
@@ -84,6 +82,11 @@ namespace OpenSim.Grid.MessagingServer
84 { 82 {
85 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 83 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
86 84
85 public PostXMPPStreamHandler()
86 : base("POST", "/presence")
87 {
88 }
89
87 public override byte[] Handle(string path, Stream request) 90 public override byte[] Handle(string path, Stream request)
88 { 91 {
89 string param = GetParam(path); 92 string param = GetParam(path);
@@ -97,12 +100,5 @@ namespace OpenSim.Grid.MessagingServer
97 100
98 return new byte[] {}; 101 return new byte[] {};
99 } 102 }
100
101 public PostXMPPStreamHandler()
102 : base("POST", "/presence")
103 {
104
105 }
106
107 } 103 }
108} 104} \ No newline at end of file