aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/Cache/GridAssetClient.cs3
-rw-r--r--OpenSim/Framework/Communications/RestClient.cs13
2 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
index 9cccf66..1c947dc 100644
--- a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
+++ b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs
@@ -63,6 +63,9 @@ namespace OpenSim.Framework.Communications.Cache
63 63
64 Stream s = rc.Request(); 64 Stream s = rc.Request();
65 65
66 if (s == null)
67 return null;
68
66 if (s.Length > 0) 69 if (s.Length > 0)
67 { 70 {
68 XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); 71 XmlSerializer xs = new XmlSerializer(typeof (AssetBase));
diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs
index b71a590..7d45186 100644
--- a/OpenSim/Framework/Communications/RestClient.cs
+++ b/OpenSim/Framework/Communications/RestClient.cs
@@ -286,7 +286,18 @@ namespace OpenSim.Framework.Communications
286 _asyncException = null; 286 _asyncException = null;
287 287
288// IAsyncResult responseAsyncResult = _request.BeginGetResponse(new AsyncCallback(ResponseIsReadyDelegate), _request); 288// IAsyncResult responseAsyncResult = _request.BeginGetResponse(new AsyncCallback(ResponseIsReadyDelegate), _request);
289 _response = (HttpWebResponse) _request.GetResponse(); 289 try
290 {
291 _response = (HttpWebResponse) _request.GetResponse();
292 }
293 catch (System.Net.WebException e)
294 {
295 m_log.ErrorFormat("[ASSET] Error fetching asset from asset server");
296 m_log.Debug(e.ToString());
297
298 return null;
299 }
300
290 Stream src = _response.GetResponseStream(); 301 Stream src = _response.GetResponseStream();
291 int length = src.Read(_readbuf, 0, BufferSize); 302 int length = src.Read(_readbuf, 0, BufferSize);
292 while (length > 0) 303 while (length > 0)