From efd90b56b761219af6425b1c7a2cdd3b6ffb4de2 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 27 Dec 2007 21:41:48 +0000 Subject: * Optimized usings * shortened references * Removed redundant 'this' * Normalized EOF --- OpenSim/Framework/Servers/BaseHttpServer.cs | 66 +++++++++++++++++------------ 1 file changed, 40 insertions(+), 26 deletions(-) (limited to 'OpenSim/Framework/Servers/BaseHttpServer.cs') diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index d865ae8..7af1716 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs @@ -97,7 +97,7 @@ namespace OpenSim.Framework.Servers HttpListenerRequest request = context.Request; HttpListenerResponse response = context.Response; - + response.KeepAlive = false; response.SendChunked = false; @@ -192,15 +192,12 @@ namespace OpenSim.Framework.Servers 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) { @@ -218,7 +215,6 @@ namespace OpenSim.Framework.Servers string methodName = xmlRprcRequest.MethodName; if (methodName != null) { - XmlRpcResponse xmlRpcResponse; XmlRpcMethod method; @@ -241,8 +237,8 @@ namespace OpenSim.Framework.Servers } else { - System.Console.WriteLine("Handler not found for http request " +request.RawUrl); - responseString = "Error"; + System.Console.WriteLine("Handler not found for http request " + request.RawUrl); + responseString = "Error"; } } @@ -266,7 +262,8 @@ namespace OpenSim.Framework.Servers response.OutputStream.Close(); } } - public void HandleHTTPRequest(Hashtable keysvals, HttpListenerRequest request, HttpListenerResponse response) + + 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. @@ -280,12 +277,14 @@ namespace OpenSim.Framework.Servers // to display the form, or process it. // a better way would be nifty. - if ((string)keysvals["show_login_form"] == "TRUE") + if ((string) keysvals["show_login_form"] == "TRUE") { - string responseString = ""; + string responseString = + ""; responseString = responseString + ""; responseString = responseString + "
"; - responseString = responseString + ""; + responseString = responseString + + ""; responseString = responseString + ""; responseString = responseString + ""; responseString = responseString + "