aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs b/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
index c53160f..bcfb0a4 100644
--- a/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
+++ b/OpenSim/Framework/Servers/HttpServer/OSHttpRequest.cs
@@ -188,7 +188,15 @@ namespace OpenSim.Framework.Servers.HttpServer
188 try 188 try
189 { 189 {
190 IPAddress addr = IPAddress.Parse(req.Headers["remote_addr"]); 190 IPAddress addr = IPAddress.Parse(req.Headers["remote_addr"]);
191 int port = Int32.Parse(req.Headers["remote_port"]); 191 // sometimes req.Headers["remote_port"] returns a comma separated list, so use
192 // the first one in the list and log it
193 string[] strPorts = req.Headers["remote_port"].Split(new char[] { ',' });
194 if (strPorts.Length > 1)
195 {
196 _log.ErrorFormat("[OSHttpRequest]: format exception on addr/port {0}:{1}, ignoring",
197 req.Headers["remote_addr"], req.Headers["remote_port"]);
198 }
199 int port = Int32.Parse(strPorts[0]);
192 _remoteIPEndPoint = new IPEndPoint(addr, port); 200 _remoteIPEndPoint = new IPEndPoint(addr, port);
193 } 201 }
194 catch (FormatException) 202 catch (FormatException)