diff options
author | Charles Krinke | 2008-04-16 03:55:21 +0000 |
---|---|---|
committer | Charles Krinke | 2008-04-16 03:55:21 +0000 |
commit | bf7e7b2c57d9b1d7d00f76bbae41093eaf267921 (patch) | |
tree | 31ab1bc76ee105b67225857850fd59073da0d131 /OpenSim/Framework | |
parent | * A tweak of the caps system so that new caps have random paths instead of a ... (diff) | |
download | opensim-SC-bf7e7b2c57d9b1d7d00f76bbae41093eaf267921.zip opensim-SC-bf7e7b2c57d9b1d7d00f76bbae41093eaf267921.tar.gz opensim-SC-bf7e7b2c57d9b1d7d00f76bbae41093eaf267921.tar.bz2 opensim-SC-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')
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/BaseHttpServer.cs | 15 |
2 files changed, 16 insertions, 3 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index cd59fa0..c0f7fce 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -435,6 +435,8 @@ namespace OpenSim.Framework | |||
435 | 435 | ||
436 | public delegate void EconomyDataRequest(LLUUID agentID); | 436 | public delegate void EconomyDataRequest(LLUUID agentID); |
437 | 437 | ||
438 | public delegate void ObjectIncludeInSearch(IClientAPI remoteClient, bool IncludeInSearch, uint localID); | ||
439 | |||
438 | public interface IClientAPI | 440 | public interface IClientAPI |
439 | { | 441 | { |
440 | event ImprovedInstantMessage OnInstantMessage; | 442 | event ImprovedInstantMessage OnInstantMessage; |
@@ -549,7 +551,7 @@ namespace OpenSim.Framework | |||
549 | event UpdateAvatarProperties OnUpdateAvatarProperties; | 551 | event UpdateAvatarProperties OnUpdateAvatarProperties; |
550 | event ParcelBuy OnParcelBuy; | 552 | event ParcelBuy OnParcelBuy; |
551 | 553 | ||
552 | 554 | event ObjectIncludeInSearch OnObjectIncludeInSearch; | |
553 | 555 | ||
554 | LLVector3 StartPos { get; set; } | 556 | LLVector3 StartPos { get; set; } |
555 | 557 | ||
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 | ||