From 134f86e8d5c414409631b25b8c6f0ee45fbd8631 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 3 Nov 2016 21:44:39 +1000 Subject: Initial update to OpenSim 0.8.2.1 source code. --- OpenSim/ConsoleClient/Properties/AssemblyInfo.cs | 2 +- OpenSim/ConsoleClient/Requester.cs | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'OpenSim/ConsoleClient') diff --git a/OpenSim/ConsoleClient/Properties/AssemblyInfo.cs b/OpenSim/ConsoleClient/Properties/AssemblyInfo.cs index c240f90..9c0c784 100644 --- a/OpenSim/ConsoleClient/Properties/AssemblyInfo.cs +++ b/OpenSim/ConsoleClient/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.7.5.*")] +[assembly: AssemblyVersion("0.7.6.*")] [assembly: AssemblyFileVersion("1.0.0.0")] 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 ReplyDelegate action) { WebRequest request = WebRequest.Create(requestUrl); - WebResponse response = null; request.Method = "POST"; @@ -64,16 +63,18 @@ namespace OpenSim.ConsoleClient { string reply = String.Empty; - response = request.EndGetResponse(ar); - - try + using (WebResponse response = request.EndGetResponse(ar)) { - StreamReader r = new StreamReader(response.GetResponseStream()); - reply = r.ReadToEnd(); + try + { + using (Stream s = response.GetResponseStream()) + using (StreamReader r = new StreamReader(s)) + reply = r.ReadToEnd(); - } - catch (System.InvalidOperationException) - { + } + catch (System.InvalidOperationException) + { + } } action(requestUrl, data, reply); -- cgit v1.1