XFF capitalization strikes again -- this time in the XMLRPC method. mantis #5386

0.7.1-dev
Diva Canto 2011-02-16 08:18:49 -08:00
parent 918c12c965
commit fc84225038
1 changed files with 13 additions and 1 deletions

View File

@ -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
{