From d0912b61516914f810ba306641aaaa813134462e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 7 May 2017 00:47:45 +0100 Subject: let StreamReader be in using statements --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/CoreModules/Avatar/Friends') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs index 81aa882..091b197 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsRequestHandler.cs @@ -65,9 +65,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends protected override byte[] ProcessRequest( string path, Stream requestData, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) { - StreamReader sr = new StreamReader(requestData); - string body = sr.ReadToEnd(); - sr.Close(); + string body; + using(StreamReader sr = new StreamReader(requestData)) + body = sr.ReadToEnd(); + body = body.Trim(); //m_log.DebugFormat("[XXX]: query String: {0}", body); -- cgit v1.1