From f013b26241a6243a439c13644abee9d31243c922 Mon Sep 17 00:00:00 2001
From: Teravus Ovares
Date: Tue, 13 Jan 2009 22:27:26 +0000
Subject: * Fix an invalid seed cap that could be causing issues. *
 CapsUtil.GetRandomCapsObjectPath(); contains a / and the
 regionInfo.httpServerURI contains a / so that makes * response.SeedCapability
 = regionInfo.httpServerURI + CapsUtil.GetCapsSeedPath(capsPath); contain two
 "//" leading to a seed caps path definition like
 //CAPS/f7ba4238-ec86-4a2b-b3f6-4d9b56070000/, which is wrong

---
 OpenSim/Grid/UserServer/UserLoginService.cs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs
index a4c8065..267b2a0 100644
--- a/OpenSim/Grid/UserServer/UserLoginService.cs
+++ b/OpenSim/Grid/UserServer/UserLoginService.cs
@@ -310,6 +310,10 @@ namespace OpenSim.Grid.UserServer
                 response.RegionY = regionInfo.regionLocY;
 
                 string capsPath = CapsUtil.GetRandomCapsObjectPath();
+
+                // Take off trailing / so that the caps path isn't //CAPS/someUUID
+                if (regionInfo.httpServerURI.EndsWith("/"))
+                    regionInfo.httpServerURI = regionInfo.httpServerURI.Substring(0, regionInfo.httpServerURI.Length - 1);
                 response.SeedCapability = regionInfo.httpServerURI + CapsUtil.GetCapsSeedPath(capsPath);
 
                 // Notify the target of an incoming user
-- 
cgit v1.1