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.cs32
1 files changed, 17 insertions, 15 deletions
diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
index 0996acb..badacb7 100644
--- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
@@ -171,27 +171,29 @@ namespace OpenSim.Services.Connectors
171 return fullAsset.Data; 171 return fullAsset.Data;
172 } 172 }
173 173
174 RestClient rc = new RestClient(m_ServerURI); 174 using (RestClient rc = new RestClient(m_ServerURI))
175 rc.AddResourcePath("assets"); 175 {
176 rc.AddResourcePath(id); 176 rc.AddResourcePath("assets");
177 rc.AddResourcePath("data"); 177 rc.AddResourcePath(id);
178 rc.AddResourcePath("data");
178 179
179 rc.RequestMethod = "GET"; 180 rc.RequestMethod = "GET";
180 181
181 Stream s = rc.Request(m_Auth); 182 Stream s = rc.Request(m_Auth);
182 183
183 if (s == null) 184 if (s == null)
184 return null; 185 return null;
185 186
186 if (s.Length > 0) 187 if (s.Length > 0)
187 { 188 {
188 byte[] ret = new byte[s.Length]; 189 byte[] ret = new byte[s.Length];
189 s.Read(ret, 0, (int)s.Length); 190 s.Read(ret, 0, (int)s.Length);
190 191
191 return ret; 192 return ret;
192 } 193 }
193 194
194 return null; 195 return null;
196 }
195 } 197 }
196 198
197 public bool Get(string id, Object sender, AssetRetrieved handler) 199 public bool Get(string id, Object sender, AssetRetrieved handler)