diff options
author | ubit | 2012-09-06 19:24:26 +0200 |
---|---|---|
committer | ubit | 2012-09-06 19:24:26 +0200 |
commit | a18c0107293de484c6e1c2c9aa39b1a3509ab500 (patch) | |
tree | 96773259a8ea319d1ec9c13ca7c978bd3a62678f | |
parent | Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff) | |
parent | Prevent double slashes, try #3 (diff) | |
download | opensim-SC-a18c0107293de484c6e1c2c9aa39b1a3509ab500.zip opensim-SC-a18c0107293de484c6e1c2c9aa39b1a3509ab500.tar.gz opensim-SC-a18c0107293de484c6e1c2c9aa39b1a3509ab500.tar.bz2 opensim-SC-a18c0107293de484c6e1c2c9aa39b1a3509ab500.tar.xz |
Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index 2a3dacc..091e41a 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs | |||
@@ -126,6 +126,9 @@ namespace OpenSim.Services.Connectors | |||
126 | 126 | ||
127 | // m_log.DebugFormat("[ASSET]: Using {0} for host name for prefix {1}", host, prefix); | 127 | // m_log.DebugFormat("[ASSET]: Using {0} for host name for prefix {1}", host, prefix); |
128 | 128 | ||
129 | string ret = serverUri.Uri.AbsoluteUri; | ||
130 | if (ret.EndsWith("/")) | ||
131 | ret = ret.Substring(0, ret.Length - 1); | ||
129 | return serverUri.Uri.AbsoluteUri; | 132 | return serverUri.Uri.AbsoluteUri; |
130 | } | 133 | } |
131 | 134 | ||
@@ -181,7 +184,7 @@ namespace OpenSim.Services.Connectors | |||
181 | 184 | ||
182 | public AssetBase Get(string id) | 185 | public AssetBase Get(string id) |
183 | { | 186 | { |
184 | string uri = Path.Combine(MapServer(id), Path.Combine("assets", id)); | 187 | string uri = MapServer(id) + "/assets/" + id; |
185 | 188 | ||
186 | AssetBase asset = null; | 189 | AssetBase asset = null; |
187 | if (m_Cache != null) | 190 | if (m_Cache != null) |
@@ -218,7 +221,7 @@ namespace OpenSim.Services.Connectors | |||
218 | return fullAsset.Metadata; | 221 | return fullAsset.Metadata; |
219 | } | 222 | } |
220 | 223 | ||
221 | string uri = Path.Combine(MapServer(id), Path.Combine("assets", id)); | 224 | string uri = MapServer(id) + "/assets/" + id + "/metadata"; |
222 | 225 | ||
223 | AssetMetadata asset = SynchronousRestObjectRequester. | 226 | AssetMetadata asset = SynchronousRestObjectRequester. |
224 | MakeRequest<int, AssetMetadata>("GET", uri, 0); | 227 | MakeRequest<int, AssetMetadata>("GET", uri, 0); |
@@ -260,7 +263,7 @@ namespace OpenSim.Services.Connectors | |||
260 | 263 | ||
261 | public bool Get(string id, Object sender, AssetRetrieved handler) | 264 | public bool Get(string id, Object sender, AssetRetrieved handler) |
262 | { | 265 | { |
263 | string uri = Path.Combine(MapServer(id), Path.Combine("assets", id)); | 266 | string uri = MapServer(id) + "/assets/" + id; |
264 | 267 | ||
265 | AssetBase asset = null; | 268 | AssetBase asset = null; |
266 | if (m_Cache != null) | 269 | if (m_Cache != null) |
@@ -379,9 +382,7 @@ namespace OpenSim.Services.Connectors | |||
379 | return asset.ID; | 382 | return asset.ID; |
380 | } | 383 | } |
381 | 384 | ||
382 | string uri = Path.Combine(MapServer(asset.FullID.ToString()), "/assets/"); | 385 | string uri = MapServer(asset.FullID.ToString()) + "/assets/"; |
383 | if (!uri.EndsWith("/")) | ||
384 | uri += "/"; | ||
385 | 386 | ||
386 | string newID = string.Empty; | 387 | string newID = string.Empty; |
387 | try | 388 | try |
@@ -458,7 +459,7 @@ namespace OpenSim.Services.Connectors | |||
458 | } | 459 | } |
459 | asset.Data = data; | 460 | asset.Data = data; |
460 | 461 | ||
461 | string uri = Path.Combine(MapServer(id), Path.Combine("assets", id)); | 462 | string uri = MapServer(id) + "/assets/" + id; |
462 | 463 | ||
463 | if (SynchronousRestObjectRequester. | 464 | if (SynchronousRestObjectRequester. |
464 | MakeRequest<AssetBase, bool>("POST", uri, asset)) | 465 | MakeRequest<AssetBase, bool>("POST", uri, asset)) |
@@ -473,7 +474,7 @@ namespace OpenSim.Services.Connectors | |||
473 | 474 | ||
474 | public bool Delete(string id) | 475 | public bool Delete(string id) |
475 | { | 476 | { |
476 | string uri = Path.Combine(MapServer(id), Path.Combine("assets", id)); | 477 | string uri = MapServer(id) + "/assets/" + id; |
477 | 478 | ||
478 | if (SynchronousRestObjectRequester. | 479 | if (SynchronousRestObjectRequester. |
479 | MakeRequest<int, bool>("DELETE", uri, 0)) | 480 | MakeRequest<int, bool>("DELETE", uri, 0)) |