From 69cc4596b1d430fcfaffd8a052c40e9af5b5f056 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 24 Dec 2007 23:35:30 +0000 Subject: * Added some ugly hackish code to the user server to start implementing the new login method. You still can't yet log-in via the new method. Does not interfere with normal userserver operation, ie safe to update if you want. --- OpenSim/Framework/Servers/BaseHttpServer.cs | 134 ++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) (limited to 'OpenSim/Framework/Servers/BaseHttpServer.cs') diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index ede425d..d865ae8 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 + "