aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Asset
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/Connectors/Asset')
-rw-r--r--OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
index 45ebf3a..2a3dacc 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
@@ -181,7 +181,7 @@ namespace OpenSim.Services.Connectors
181 181
182 public AssetBase Get(string id) 182 public AssetBase Get(string id)
183 { 183 {
184 string uri = MapServer(id) + "/assets/" + id; 184 string uri = Path.Combine(MapServer(id), Path.Combine("assets", id));
185 185
186 AssetBase asset = null; 186 AssetBase asset = null;
187 if (m_Cache != null) 187 if (m_Cache != null)
@@ -218,7 +218,7 @@ namespace OpenSim.Services.Connectors
218 return fullAsset.Metadata; 218 return fullAsset.Metadata;
219 } 219 }
220 220
221 string uri = MapServer(id) + "/assets/" + id + "/metadata"; 221 string uri = Path.Combine(MapServer(id), Path.Combine("assets", id));
222 222
223 AssetMetadata asset = SynchronousRestObjectRequester. 223 AssetMetadata asset = SynchronousRestObjectRequester.
224 MakeRequest<int, AssetMetadata>("GET", uri, 0); 224 MakeRequest<int, AssetMetadata>("GET", uri, 0);
@@ -260,7 +260,7 @@ namespace OpenSim.Services.Connectors
260 260
261 public bool Get(string id, Object sender, AssetRetrieved handler) 261 public bool Get(string id, Object sender, AssetRetrieved handler)
262 { 262 {
263 string uri = MapServer(id) + "/assets/" + id; 263 string uri = Path.Combine(MapServer(id), Path.Combine("assets", id));
264 264
265 AssetBase asset = null; 265 AssetBase asset = null;
266 if (m_Cache != null) 266 if (m_Cache != null)
@@ -379,7 +379,9 @@ namespace OpenSim.Services.Connectors
379 return asset.ID; 379 return asset.ID;
380 } 380 }
381 381
382 string uri = MapServer(asset.FullID.ToString()) + "/assets/"; 382 string uri = Path.Combine(MapServer(asset.FullID.ToString()), "/assets/");
383 if (!uri.EndsWith("/"))
384 uri += "/";
383 385
384 string newID = string.Empty; 386 string newID = string.Empty;
385 try 387 try
@@ -456,7 +458,7 @@ namespace OpenSim.Services.Connectors
456 } 458 }
457 asset.Data = data; 459 asset.Data = data;
458 460
459 string uri = MapServer(id) + "/assets/" + id; 461 string uri = Path.Combine(MapServer(id), Path.Combine("assets", id));
460 462
461 if (SynchronousRestObjectRequester. 463 if (SynchronousRestObjectRequester.
462 MakeRequest<AssetBase, bool>("POST", uri, asset)) 464 MakeRequest<AssetBase, bool>("POST", uri, asset))
@@ -471,7 +473,7 @@ namespace OpenSim.Services.Connectors
471 473
472 public bool Delete(string id) 474 public bool Delete(string id)
473 { 475 {
474 string uri = MapServer(id) + "/assets/" + id; 476 string uri = Path.Combine(MapServer(id), Path.Combine("assets", id));
475 477
476 if (SynchronousRestObjectRequester. 478 if (SynchronousRestObjectRequester.
477 MakeRequest<int, bool>("DELETE", uri, 0)) 479 MakeRequest<int, bool>("DELETE", uri, 0))