aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ConsoleClient
diff options
context:
space:
mode:
authorDiva Canto2013-02-27 20:50:03 -0800
committerDiva Canto2013-02-27 20:50:03 -0800
commit64b8ce73dabcf651beadcc11cbe94db69cc3ea0e (patch)
treeab7f3a63c166185a5fd9d6d5a7e36a18d63a9817 /OpenSim/ConsoleClient
parentMoved the HG default variables out of [Startup] and into their own section [H... (diff)
parentAdd comment to example region modules about need to add Assembly annotation i... (diff)
downloadopensim-SC_OLD-64b8ce73dabcf651beadcc11cbe94db69cc3ea0e.zip
opensim-SC_OLD-64b8ce73dabcf651beadcc11cbe94db69cc3ea0e.tar.gz
opensim-SC_OLD-64b8ce73dabcf651beadcc11cbe94db69cc3ea0e.tar.bz2
opensim-SC_OLD-64b8ce73dabcf651beadcc11cbe94db69cc3ea0e.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/ConsoleClient')
-rw-r--r--OpenSim/ConsoleClient/Requester.cs19
1 files changed, 10 insertions, 9 deletions
diff --git a/OpenSim/ConsoleClient/Requester.cs b/OpenSim/ConsoleClient/Requester.cs
index aabb02c..0a21328 100644
--- a/OpenSim/ConsoleClient/Requester.cs
+++ b/OpenSim/ConsoleClient/Requester.cs
@@ -44,7 +44,6 @@ namespace OpenSim.ConsoleClient
44 ReplyDelegate action) 44 ReplyDelegate action)
45 { 45 {
46 WebRequest request = WebRequest.Create(requestUrl); 46 WebRequest request = WebRequest.Create(requestUrl);
47 WebResponse response = null;
48 47
49 request.Method = "POST"; 48 request.Method = "POST";
50 49
@@ -64,16 +63,18 @@ namespace OpenSim.ConsoleClient
64 { 63 {
65 string reply = String.Empty; 64 string reply = String.Empty;
66 65
67 response = request.EndGetResponse(ar); 66 using (WebResponse response = request.EndGetResponse(ar))
68
69 try
70 { 67 {
71 StreamReader r = new StreamReader(response.GetResponseStream()); 68 try
72 reply = r.ReadToEnd(); 69 {
70 using (Stream s = response.GetResponseStream())
71 using (StreamReader r = new StreamReader(s))
72 reply = r.ReadToEnd();
73 73
74 } 74 }
75 catch (System.InvalidOperationException) 75 catch (System.InvalidOperationException)
76 { 76 {
77 }
77 } 78 }
78 79
79 action(requestUrl, data, reply); 80 action(requestUrl, data, reply);