From fc6c4dc399587f6f920d3f0759b1bd7a8b9b4ac8 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Thu, 1 May 2008 16:41:01 +0000 Subject: * Cleaning code still. --- OpenSim/Grid/MessagingServer/XMPPHTTPService.cs | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'OpenSim/Grid/MessagingServer/XMPPHTTPService.cs') 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 : base("GET", "/presence") { m_log.Info("[REST]: In Get Request"); - } - + public override byte[] Handle(string path, Stream request) { string param = GetParam(path); byte[] result = new byte[] {}; try { - string[] p = param.Split(new char[] {'/', '?', '&'}, StringSplitOptions.RemoveEmptyEntries); + string[] p = param.Split(new[] {'/', '?', '&'}, StringSplitOptions.RemoveEmptyEntries); if (p.Length > 0) { - LLUUID assetID = null; - + LLUUID assetID = null; + if (!LLUUID.TryParse(p[0], out assetID)) { m_log.InfoFormat( "[REST]: GET:/presence ignoring request with malformed UUID {0}", p[0]); return result; } - } } catch (Exception e) @@ -84,6 +82,11 @@ namespace OpenSim.Grid.MessagingServer { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + public PostXMPPStreamHandler() + : base("POST", "/presence") + { + } + public override byte[] Handle(string path, Stream request) { string param = GetParam(path); @@ -97,12 +100,5 @@ namespace OpenSim.Grid.MessagingServer return new byte[] {}; } - - public PostXMPPStreamHandler() - : base("POST", "/presence") - { - - } - } -} +} \ No newline at end of file -- cgit v1.1