From c0fd09b4453f6fef7b59dbcd820e33018df63a32 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 7 Apr 2014 19:41:25 -0700 Subject: Avoid calling HELO service on malformed URLs. This is in response to an exception reported by danbanner. --- OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Services/Connectors/Hypergrid') diff --git a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs index 5004d99..d04cc22 100644 --- a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs @@ -75,6 +75,12 @@ namespace OpenSim.Services.Connectors public virtual string Helo() { + if (String.IsNullOrEmpty(m_ServerURI)) + { + m_log.WarnFormat("[HELO SERVICE]: Unable to invoke HELO due to malformed URL"); + return String.Empty; + } + HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(m_ServerURI); // Eventually we need to switch to HEAD /* req.Method = "HEAD"; */ -- cgit v1.1