aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/BaseHttpServer.cs
diff options
context:
space:
mode:
authorCharles Krinke2008-04-16 03:55:21 +0000
committerCharles Krinke2008-04-16 03:55:21 +0000
commitbf7e7b2c57d9b1d7d00f76bbae41093eaf267921 (patch)
tree31ab1bc76ee105b67225857850fd59073da0d131 /OpenSim/Framework/Servers/BaseHttpServer.cs
parent* A tweak of the caps system so that new caps have random paths instead of a ... (diff)
downloadopensim-SC_OLD-bf7e7b2c57d9b1d7d00f76bbae41093eaf267921.zip
opensim-SC_OLD-bf7e7b2c57d9b1d7d00f76bbae41093eaf267921.tar.gz
opensim-SC_OLD-bf7e7b2c57d9b1d7d00f76bbae41093eaf267921.tar.bz2
opensim-SC_OLD-bf7e7b2c57d9b1d7d00f76bbae41093eaf267921.tar.xz
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.
Diffstat (limited to 'OpenSim/Framework/Servers/BaseHttpServer.cs')
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs15
1 files changed, 13 insertions, 2 deletions
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
440 string[] querystringkeys = request.QueryString.AllKeys; 440 string[] querystringkeys = request.QueryString.AllKeys;
441 string[] rHeaders = request.Headers.AllKeys; 441 string[] rHeaders = request.Headers.AllKeys;
442 442
443
443 foreach (string queryname in querystringkeys) 444 foreach (string queryname in querystringkeys)
444 { 445 {
445 keysvals.Add(queryname, request.QueryString[queryname]); 446 keysvals.Add(queryname, request.QueryString[queryname]);
@@ -487,7 +488,16 @@ namespace OpenSim.Framework.Servers
487 { 488 {
488 int responsecode = (int)responsedata["int_response_code"]; 489 int responsecode = (int)responsedata["int_response_code"];
489 string responseString = (string)responsedata["str_response_string"]; 490 string responseString = (string)responsedata["str_response_string"];
490 491 string contentType = (string)responsedata["content_type"];
492
493 //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this
494 //and should check for NullReferenceExceptions
495
496 if (contentType == null || contentType == "")
497 {
498 contentType = "text/html";
499 }
500
491 // We're forgoing the usual error status codes here because the client 501 // We're forgoing the usual error status codes here because the client
492 // ignores anything but 200 and 301 502 // ignores anything but 200 and 301
493 503
@@ -498,7 +508,8 @@ namespace OpenSim.Framework.Servers
498 response.RedirectLocation = (string)responsedata["str_redirect_location"]; 508 response.RedirectLocation = (string)responsedata["str_redirect_location"];
499 response.StatusCode = responsecode; 509 response.StatusCode = responsecode;
500 } 510 }
501 response.AddHeader("Content-type", "text/html"); 511
512 response.AddHeader("Content-type", contentType);
502 513
503 byte[] buffer = Encoding.UTF8.GetBytes(responseString); 514 byte[] buffer = Encoding.UTF8.GetBytes(responseString);
504 515