From 7cab41f4223b7febd3fdd42fa7cfefef25e4a9c9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 15 Nov 2013 21:45:08 +0000 Subject: refactor: replace verbose checks with String.IsNullOrEmpty where applicable. Thanks to Kira for this patch from http://opensimulator.org/mantis/view.php?id=6845 --- .../Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/CoreModules/Scripting/HttpRequest') diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index 1a62405..c3a8afd 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs @@ -460,9 +460,9 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest Request.Headers.Add(HttpCustomHeaders[i], HttpCustomHeaders[i+1]); } - if (proxyurl != null && proxyurl.Length > 0) + if (!string.IsNullOrEmpty(proxyurl)) { - if (proxyexcepts != null && proxyexcepts.Length > 0) + if (!string.IsNullOrEmpty(proxyexcepts)) { string[] elist = proxyexcepts.Split(';'); Request.Proxy = new WebProxy(proxyurl, true, elist); @@ -483,7 +483,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest } // Encode outbound data - if (OutboundBody != null && OutboundBody.Length > 0) + if (!string.IsNullOrEmpty(OutboundBody)) { byte[] data = Util.UTF8.GetBytes(OutboundBody); -- cgit v1.1