From fc84225038a44e114fe58e4b789b746c9b7a8338 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 16 Feb 2011 08:18:49 -0800 Subject: XFF capitalization strikes again -- this time in the XMLRPC method. mantis #5386 --- OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs index 4c35132..1d05b02 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs @@ -785,7 +785,19 @@ namespace OpenSim.Framework.Servers.HttpServer if (methodWasFound) { xmlRprcRequest.Params.Add(request.Url); // Param[2] - xmlRprcRequest.Params.Add(request.Headers.Get("X-Forwarded-For")); // Param[3] + + string xff = "X-Forwarded-For"; + string xfflower = xff.ToLower(); + foreach (string s in request.Headers.AllKeys) + { + if (s != null && s.Equals(xfflower)) + { + xff = xfflower; + break; + } + } + xmlRprcRequest.Params.Add(request.Headers.Get(xff)); // Param[3] + try { -- cgit v1.1