aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs
diff options
context:
space:
mode:
authorMelanie2011-12-28 09:24:35 +0000
committerMelanie2011-12-28 09:24:35 +0000
commitbde004c08edbe1e0209fe348d7464ea3dab7f657 (patch)
treee653ee608b265a19687e49f267e0df030d68848d /OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs
parentFix permissions being lost and correct slam behavior, removing icompatible (diff)
parentIntroduce a LightShare kill packet ans send it when needed. Currently only (diff)
downloadopensim-SC-bde004c08edbe1e0209fe348d7464ea3dab7f657.zip
opensim-SC-bde004c08edbe1e0209fe348d7464ea3dab7f657.tar.gz
opensim-SC-bde004c08edbe1e0209fe348d7464ea3dab7f657.tar.bz2
opensim-SC-bde004c08edbe1e0209fe348d7464ea3dab7f657.tar.xz
Merge branch 'master' into careminster
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs21
1 files changed, 19 insertions, 2 deletions
diff --git a/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs
index 5c31639..bb5d51f 100644
--- a/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/HGAssetServiceConnector.cs
@@ -29,7 +29,9 @@ using log4net;
29using Nini.Config; 29using Nini.Config;
30using System; 30using System;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using System.Collections.Specialized;
32using System.Reflection; 33using System.Reflection;
34using System.Web;
33using OpenSim.Framework; 35using OpenSim.Framework;
34using OpenSim.Services.Interfaces; 36using OpenSim.Services.Interfaces;
35using OpenSim.Services.Connectors.Hypergrid; 37using OpenSim.Services.Connectors.Hypergrid;
@@ -73,11 +75,26 @@ namespace OpenSim.Services.Connectors
73 if (Uri.TryCreate(id, UriKind.Absolute, out assetUri) && 75 if (Uri.TryCreate(id, UriKind.Absolute, out assetUri) &&
74 assetUri.Scheme == Uri.UriSchemeHttp) 76 assetUri.Scheme == Uri.UriSchemeHttp)
75 { 77 {
76 url = "http://" + assetUri.Authority; 78 // Simian
77 assetID = assetUri.LocalPath.Trim(new char[] {'/'}); 79 if (assetUri.Query != string.Empty)
80 {
81 NameValueCollection qscoll = HttpUtility.ParseQueryString(assetUri.Query);
82 assetID = qscoll["id"];
83 if (assetID != null)
84 url = id.Replace(assetID, ""); // Malformed again, as simian expects
85 else
86 url = id; // !!! best effort
87 }
88 else // robust
89 {
90 url = "http://" + assetUri.Authority;
91 assetID = assetUri.LocalPath.Trim(new char[] { '/' });
92 }
93
78 return true; 94 return true;
79 } 95 }
80 96
97 m_log.DebugFormat("[HG ASSET SERVICE]: Malformed URL {0}", id);
81 return false; 98 return false;
82 } 99 }
83 100