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 From 60fe3d48ee83f004861044c51537256c0c389478 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 18 Feb 2011 23:50:54 +0000 Subject: Put some CapabilitiesModule null checks in Scene Stop tests setting up a capabilities module by default --- OpenSim/Framework/Capabilities/Caps.cs | 1 - 1 file changed, 1 deletion(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs index c2f9c3a..3be97b5 100644 --- a/OpenSim/Framework/Capabilities/Caps.cs +++ b/OpenSim/Framework/Capabilities/Caps.cs @@ -181,7 +181,6 @@ namespace OpenSim.Framework.Capabilities RegisterRegionServiceHandlers(capsBase); RegisterInventoryServiceHandlers(capsBase); - } public void RegisterRegionServiceHandlers(string capsBase) -- cgit v1.1