aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/RestClient/RestClient.cs
diff options
context:
space:
mode:
authorlbsa712007-12-27 21:41:48 +0000
committerlbsa712007-12-27 21:41:48 +0000
commitefd90b56b761219af6425b1c7a2cdd3b6ffb4de2 (patch)
treebf5b897e1e3c13211e3e2fc61d30508b94c928c0 /OpenSim/Framework/Communications/RestClient/RestClient.cs
parent* removed always true if (diff)
downloadopensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.zip
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.gz
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.bz2
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.xz
* Optimized usings
* shortened references * Removed redundant 'this' * Normalized EOF
Diffstat (limited to 'OpenSim/Framework/Communications/RestClient/RestClient.cs')
-rw-r--r--OpenSim/Framework/Communications/RestClient/RestClient.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/Framework/Communications/RestClient/RestClient.cs b/OpenSim/Framework/Communications/RestClient/RestClient.cs
index 5c77193..1aaf68e 100644
--- a/OpenSim/Framework/Communications/RestClient/RestClient.cs
+++ b/OpenSim/Framework/Communications/RestClient/RestClient.cs
@@ -238,7 +238,7 @@ namespace OpenSim.Framework.Communications
238 } 238 }
239 } 239 }
240 realuri = sb.ToString(); 240 realuri = sb.ToString();
241 MainLog.Instance.Verbose("REST", "RestURL: {0}", realuri); 241 MainLog.Instance.Verbose("REST", "RestURL: {0}", realuri);
242 return new Uri(sb.ToString()); 242 return new Uri(sb.ToString());
243 } 243 }
244 244
@@ -365,7 +365,7 @@ namespace OpenSim.Framework.Communications
365 } 365 }
366 366
367 public Stream Request(Stream src) 367 public Stream Request(Stream src)
368 { 368 {
369 _request = (HttpWebRequest) WebRequest.Create(buildUri()); 369 _request = (HttpWebRequest) WebRequest.Create(buildUri());
370 _request.KeepAlive = false; 370 _request.KeepAlive = false;
371 _request.ContentType = "application/xml"; 371 _request.ContentType = "application/xml";
@@ -374,16 +374,16 @@ namespace OpenSim.Framework.Communications
374 _asyncException = null; 374 _asyncException = null;
375 _request.ContentLength = src.Length; 375 _request.ContentLength = src.Length;
376 376
377 MainLog.Instance.Verbose("REST", "Request Length {0}", _request.ContentLength); 377 MainLog.Instance.Verbose("REST", "Request Length {0}", _request.ContentLength);
378 MainLog.Instance.Verbose("REST", "Sending Web Request {0}", buildUri()); 378 MainLog.Instance.Verbose("REST", "Sending Web Request {0}", buildUri());
379 src.Seek(0, SeekOrigin.Begin); 379 src.Seek(0, SeekOrigin.Begin);
380 MainLog.Instance.Verbose("REST", "Seek is ok"); 380 MainLog.Instance.Verbose("REST", "Seek is ok");
381 Stream dst = _request.GetRequestStream(); 381 Stream dst = _request.GetRequestStream();
382 MainLog.Instance.Verbose("REST", "GetRequestStream is ok"); 382 MainLog.Instance.Verbose("REST", "GetRequestStream is ok");
383 383
384 byte[] buf = new byte[1024]; 384 byte[] buf = new byte[1024];
385 int length = src.Read(buf, 0, 1024); 385 int length = src.Read(buf, 0, 1024);
386 MainLog.Instance.Verbose("REST", "First Read is ok"); 386 MainLog.Instance.Verbose("REST", "First Read is ok");
387 while (length > 0) 387 while (length > 0)
388 { 388 {
389 dst.Write(buf, 0, length); 389 dst.Write(buf, 0, length);
@@ -440,4 +440,4 @@ namespace OpenSim.Framework.Communications
440 440
441 #endregion Async Invocation 441 #endregion Async Invocation
442 } 442 }
443} 443} \ No newline at end of file