From 1f78dc65041729567edc411a3e63dd9a32a268a3 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 7 Oct 2011 00:30:35 +0100
Subject: remove the pointless slashes on the end of the (5!) different server
 stat retrieval mechanisms.

Original request URLs that end with / will still work, but this will allow one to type /simstatus as well as /simstatus/
Can't do this with webstats yet since it does insane things to the path.
---
 OpenSim/Region/Application/OpenSimBase.cs                     |  6 +++---
 .../Region/CoreModules/Framework/Monitoring/MonitorModule.cs  |  2 +-
 OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs         | 11 ++---------
 3 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 6fba71e..e867bc2 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -728,7 +728,7 @@ namespace OpenSim
 
             public string Path
             {
-                get { return "/simstatus/"; }
+                get { return "/simstatus"; }
             }
         }
 
@@ -766,7 +766,7 @@ namespace OpenSim
             public string Path
             {
                 // This is for the OpenSimulator instance and is the osSecret hashed
-                get { return "/" + osXStatsURI + "/"; }
+                get { return "/" + osXStatsURI; }
             }
         }
 
@@ -807,7 +807,7 @@ namespace OpenSim
             public string Path
             {
                 // This is for the OpenSimulator instance and is the user provided URI 
-                get { return "/" + osUXStatsURI + "/"; }
+                get { return "/" + osUXStatsURI; }
             }
         }
 
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
index b5cbcbb..09095c2 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
@@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring
                                "Returns a variety of statistics about the current region and/or simulator",
                                DebugMonitors);
 
-            MainServer.Instance.AddHTTPHandler("/monitorstats/" + m_scene.RegionInfo.RegionID + "/", StatsPage);
+            MainServer.Instance.AddHTTPHandler("/monitorstats/" + m_scene.RegionInfo.RegionID, StatsPage);
         }
 
         public Hashtable StatsPage(Hashtable request)
diff --git a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs
index d25d5dd..4578236 100644
--- a/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs
+++ b/OpenSim/Region/Framework/Scenes/RegionStatsHandler.cs
@@ -36,7 +36,6 @@ using OpenMetaverse;
 using OpenMetaverse.StructuredData;
 using OpenSim.Framework;
 using OpenSim.Framework.Communications;
-
 using OpenSim.Framework.Console;
 using OpenSim.Framework.Servers;
 using OpenSim.Framework.Servers.HttpServer;
@@ -45,12 +44,8 @@ using OpenSim.Region.Framework;
 using OpenSim.Region.Framework.Interfaces;
 using OpenSim.Region.Framework.Scenes;
 
-
-
 namespace OpenSim.Region.Framework.Scenes
 {
-    
-                                      
     public class RegionStatsHandler : IStreamedRequestHandler
     {
         private string osRXStatsURI = String.Empty;
@@ -67,7 +62,6 @@ namespace OpenSim.Region.Framework.Scenes
             regionInfo = region_info;
             osRXStatsURI = Util.SHA1Hash(regionInfo.regionSecret);
             osXStatsURI = Util.SHA1Hash(regionInfo.osSecret);
-  
         }
                     
         public byte[] Handle(string path, Stream request, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
@@ -88,7 +82,7 @@ namespace OpenSim.Region.Framework.Scenes
         public string Path
         {
             // This is for the region and is the regionSecret hashed
-            get { return "/" + osRXStatsURI + "/"; }
+            get { return "/" + osRXStatsURI; }
         }
         
         private string Report()
@@ -106,7 +100,6 @@ namespace OpenSim.Region.Framework.Scenes
             strBuffer = OSDParser.SerializeJsonString(args);
 
             return strBuffer;
-            
          }
     }
-}
+}
\ No newline at end of file
-- 
cgit v1.1