aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/IClientAPI.cs4
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs15
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