More on SLURLs and V3. This is hacky, but it works. Basically, we have to redefine the encoding of HG URLs because the viewer messes them up. Examples of what works and doesn't work:
- secondlife://ucigrid00.nacs.uci.edu|8002/128/128 <-- works throughout the viewer - secondlife://http|!!ucigrid00.nacs.uci.edu|8002+Test+Zone+1/128/128 <-- works throughout the viewer - secondlife://http|!!grid.sciencesim.com!grid!hypergrid.php+Yellowstone01+74/128/128 <-- works throughout - secondlife://http%3A%2F%2Fucigrid00.nacs.uci.edu%3A8002%20UCI%20Central%201/128/128 <-- works in chat, but not as URLs in the webkit0.7.3-post-fixes
parent
02db31db6a
commit
a275127a65
|
@ -97,14 +97,18 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
// Hack to get around the fact that ll V3 now drops the port from the
|
// Hack to get around the fact that ll V3 now drops the port from the
|
||||||
// map name. See https://jira.secondlife.com/browse/VWR-28570
|
// map name. See https://jira.secondlife.com/browse/VWR-28570
|
||||||
//
|
//
|
||||||
// Caller, use this form instead:
|
// Caller, use this magic form instead:
|
||||||
// secondlife://mygrid.com|8002|Region+Name/128/128
|
// secondlife://http|!!mygrid.com|8002|Region+Name/128/128
|
||||||
|
// or url encode if possible.
|
||||||
// the hacks we do with this viewer...
|
// the hacks we do with this viewer...
|
||||||
//
|
//
|
||||||
|
string mapNameOrig = mapName;
|
||||||
if (mapName.Contains("|"))
|
if (mapName.Contains("|"))
|
||||||
mapName = mapName.Replace('|', ':');
|
mapName = mapName.Replace('|', ':');
|
||||||
if (mapName.Contains("+"))
|
if (mapName.Contains("+"))
|
||||||
mapName = mapName.Replace('+', ' ');
|
mapName = mapName.Replace('+', ' ');
|
||||||
|
if (mapName.Contains("!"))
|
||||||
|
mapName = mapName.Replace('!', '/');
|
||||||
|
|
||||||
// try to fetch from GridServer
|
// try to fetch from GridServer
|
||||||
List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
|
List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
|
||||||
|
@ -126,6 +130,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
data.MapImageId = UUID.Zero;
|
data.MapImageId = UUID.Zero;
|
||||||
else
|
else
|
||||||
data.MapImageId = info.TerrainImage;
|
data.MapImageId = info.TerrainImage;
|
||||||
|
// ugh! V2-3 is very sensitive about the result being
|
||||||
|
// exactly the same as the requested name
|
||||||
|
if (regionInfos.Count == 1)
|
||||||
|
data.Name = mapNameOrig;
|
||||||
|
else
|
||||||
data.Name = info.RegionName;
|
data.Name = info.RegionName;
|
||||||
data.RegionFlags = 0; // TODO not used?
|
data.RegionFlags = 0; // TODO not used?
|
||||||
data.WaterHeight = 0; // not used
|
data.WaterHeight = 0; // not used
|
||||||
|
|
Loading…
Reference in New Issue