aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/RestClient
diff options
context:
space:
mode:
authorSean Dague2007-11-01 22:01:26 +0000
committerSean Dague2007-11-01 22:01:26 +0000
commit21e47f8ef04bd345eb3c8e0823392a2dbc269e4e (patch)
treeaf3e23b20ba917983bc4b3387b358cd65cedc1c9 /OpenSim/Framework/Communications/RestClient
parentNeed to clean up resources when creating/updating assets (diff)
downloadopensim-SC_OLD-21e47f8ef04bd345eb3c8e0823392a2dbc269e4e.zip
opensim-SC_OLD-21e47f8ef04bd345eb3c8e0823392a2dbc269e4e.tar.gz
opensim-SC_OLD-21e47f8ef04bd345eb3c8e0823392a2dbc269e4e.tar.bz2
opensim-SC_OLD-21e47f8ef04bd345eb3c8e0823392a2dbc269e4e.tar.xz
debug tracing for asset server hangs
Diffstat (limited to 'OpenSim/Framework/Communications/RestClient')
-rw-r--r--OpenSim/Framework/Communications/RestClient/RestClient.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Framework/Communications/RestClient/RestClient.cs b/OpenSim/Framework/Communications/RestClient/RestClient.cs
index ac3a287..acb3fd4 100644
--- a/OpenSim/Framework/Communications/RestClient/RestClient.cs
+++ b/OpenSim/Framework/Communications/RestClient/RestClient.cs
@@ -5,6 +5,7 @@ using System.Net;
5using System.Text; 5using System.Text;
6using System.Threading; 6using System.Threading;
7using System.Web; 7using System.Web;
8using OpenSim.Framework.Console;
8 9
9namespace OpenSim.Framework.Communications 10namespace OpenSim.Framework.Communications
10{ 11{
@@ -209,6 +210,7 @@ namespace OpenSim.Framework.Communications
209 } 210 }
210 } 211 }
211 realuri = sb.ToString(); 212 realuri = sb.ToString();
213 MainLog.Instance.Verbose("REST", "RestURL: {0}", realuri);
212 return new Uri(sb.ToString()); 214 return new Uri(sb.ToString());
213 } 215 }
214 216
@@ -335,7 +337,7 @@ namespace OpenSim.Framework.Communications
335 } 337 }
336 338
337 public Stream Request(Stream src) 339 public Stream Request(Stream src)
338 { 340 {
339 _request = (HttpWebRequest) WebRequest.Create(buildUri()); 341 _request = (HttpWebRequest) WebRequest.Create(buildUri());
340 _request.KeepAlive = false; 342 _request.KeepAlive = false;
341 _request.ContentType = "application/xml"; 343 _request.ContentType = "application/xml";
@@ -344,10 +346,16 @@ namespace OpenSim.Framework.Communications
344 _asyncException = null; 346 _asyncException = null;
345 _request.ContentLength = src.Length; 347 _request.ContentLength = src.Length;
346 348
349 MainLog.Instance.Verbose("REST", "Request Length {0}", _request.ContentLength);
350 MainLog.Instance.Verbose("REST", "Sending Web Request {0}", buildUri());
347 src.Seek(0, SeekOrigin.Begin); 351 src.Seek(0, SeekOrigin.Begin);
352 MainLog.Instance.Verbose("REST", "Seek is ok");
348 Stream dst = _request.GetRequestStream(); 353 Stream dst = _request.GetRequestStream();
354 MainLog.Instance.Verbose("REST", "GetRequestStream is ok");
355
349 byte[] buf = new byte[1024]; 356 byte[] buf = new byte[1024];
350 int length = src.Read(buf, 0, 1024); 357 int length = src.Read(buf, 0, 1024);
358 MainLog.Instance.Verbose("REST", "First Read is ok");
351 while (length > 0) 359 while (length > 0)
352 { 360 {
353 dst.Write(buf, 0, length); 361 dst.Write(buf, 0, length);
@@ -404,4 +412,4 @@ namespace OpenSim.Framework.Communications
404 412
405 #endregion Async Invocation 413 #endregion Async Invocation
406 } 414 }
407} \ No newline at end of file 415}