From bf7e7b2c57d9b1d7d00f76bbae41093eaf267921 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Wed, 16 Apr 2008 03:55:21 +0000 Subject: Thank you very much, Kmeisthax for: This patch makes the "Show in Search" checkbox on the viewer work. Additionally, I also discovered that show-in-search objects use the JointWheel flag, so this patch currently uses that flag. LibSL needs to add a flag to enum LLObject.ObjectFlags, "IncludeSearch = 32768" so we aren't using a legacy flag. Additionally this patch also contains a small fix to BaseHTTPServer that lets the response content-type to be something other than text/html. For some reason this didn't get submitted with the DataSnapshot merge. --- OpenSim/Framework/Servers/BaseHttpServer.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework/Servers') diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index 0baddb8..de15923 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs @@ -440,6 +440,7 @@ namespace OpenSim.Framework.Servers string[] querystringkeys = request.QueryString.AllKeys; string[] rHeaders = request.Headers.AllKeys; + foreach (string queryname in querystringkeys) { keysvals.Add(queryname, request.QueryString[queryname]); @@ -487,7 +488,16 @@ namespace OpenSim.Framework.Servers { int responsecode = (int)responsedata["int_response_code"]; string responseString = (string)responsedata["str_response_string"]; - + string contentType = (string)responsedata["content_type"]; + + //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this + //and should check for NullReferenceExceptions + + if (contentType == null || contentType == "") + { + contentType = "text/html"; + } + // We're forgoing the usual error status codes here because the client // ignores anything but 200 and 301 @@ -498,7 +508,8 @@ namespace OpenSim.Framework.Servers response.RedirectLocation = (string)responsedata["str_redirect_location"]; response.StatusCode = responsecode; } - response.AddHeader("Content-type", "text/html"); + + response.AddHeader("Content-type", contentType); byte[] buffer = Encoding.UTF8.GetBytes(responseString); -- cgit v1.1