diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index ede425d7c4..d865ae8288 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs @@ -97,6 +97,7 @@ namespace OpenSim.Framework.Servers HttpListenerRequest request = context.Request; HttpListenerResponse response = context.Response; + response.KeepAlive = false; response.SendChunked = false; @@ -186,7 +187,30 @@ namespace OpenSim.Framework.Servers } catch (XmlException e) { + Hashtable keysvals = new Hashtable(); responseString = String.Format("XmlException:\n{0}", e.Message); + MainLog.Instance.Error("XML", responseString); + string[] querystringkeys = request.QueryString.AllKeys; + string[] rHeaders = request.Headers.AllKeys; + + + + + foreach (string queryname in querystringkeys) + { + keysvals.Add(queryname, request.QueryString[queryname]); + MainLog.Instance.Warn("HTTP", queryname + "=" + request.QueryString[queryname]); + + } + foreach (string headername in rHeaders) + { + MainLog.Instance.Warn("HEADER", headername + "=" + request.Headers[headername]); + } + if (keysvals.ContainsKey("show_login_form")) + { + HandleHTTPRequest(keysvals, request, response); + return; + } } if (xmlRprcRequest != null) @@ -242,7 +266,117 @@ namespace OpenSim.Framework.Servers response.OutputStream.Close(); } } + public void HandleHTTPRequest(Hashtable keysvals, HttpListenerRequest request, HttpListenerResponse response) + { + // This is a test. There's a workable alternative.. as this way sucks. + // We'd like to put this into a text file parhaps that's easily editable. + // + // For this test to work, I used the following secondlife.exe parameters + // "C:\Program Files\SecondLifeWindLight\SecondLifeWindLight.exe" -settings settings_windlight.xml -channel "Second Life WindLight" -set SystemLanguage en-us -loginpage http://10.1.1.2:8002/?show_login_form=TRUE -loginuri http://10.1.1.2:8002 -user 10.1.1.2 + // + // Even after all that, there's still an error, but it's a start. + // + // I depend on show_login_form being in the secondlife.exe parameters to figure out + // to display the form, or process it. + // a better way would be nifty. + if ((string)keysvals["show_login_form"] == "TRUE") + { + string responseString = ""; + responseString = responseString + ""; + responseString = responseString + "
"; + responseString = responseString + ""; + responseString = responseString + ""; + responseString = responseString + ""; + responseString = responseString + "