aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/BaseHttpServer.cs
diff options
context:
space:
mode:
authorDr Scofield2008-10-06 21:59:43 +0000
committerDr Scofield2008-10-06 21:59:43 +0000
commitad04626737c164138d6d15d5e06eb20ff5b5f859 (patch)
tree6bc3aeb5dbb645503fcedb4012e68f069f8ada72 /OpenSim/Framework/Servers/BaseHttpServer.cs
parentoops. forgot testcase (diff)
downloadopensim-SC_OLD-ad04626737c164138d6d15d5e06eb20ff5b5f859.zip
opensim-SC_OLD-ad04626737c164138d6d15d5e06eb20ff5b5f859.tar.gz
opensim-SC_OLD-ad04626737c164138d6d15d5e06eb20ff5b5f859.tar.bz2
opensim-SC_OLD-ad04626737c164138d6d15d5e06eb20ff5b5f859.tar.xz
cleaning up OSHttpResponse: note that read access to extra header
fields is GONE (HttpServer does not support that), you can read the "normal" HTTP headers available via properties, and you can add headers. also, it is now possible to set a timeout for KeepAlive (for those clients that pay attention to it). this also fixes the broken REST inventory/assets/appearance services, they should be working again. testcase for OSHttpResponse will follow.
Diffstat (limited to 'OpenSim/Framework/Servers/BaseHttpServer.cs')
-rw-r--r--OpenSim/Framework/Servers/BaseHttpServer.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index d1c22d6..558b383 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -277,7 +277,7 @@ namespace OpenSim.Framework.Servers
277 } 277 }
278 278
279 IRequestHandler requestHandler; 279 IRequestHandler requestHandler;
280 response.KeepAlive = false; 280 response.KeepAlive = true;
281 response.SendChunked = false; 281 response.SendChunked = false;
282 282
283 string path = request.RawUrl; 283 string path = request.RawUrl;
@@ -634,7 +634,7 @@ namespace OpenSim.Framework.Servers
634 requestStream.Close(); 634 requestStream.Close();
635 635
636 //m_log.DebugFormat("[OGP]: {0}:{1}", request.RawUrl, requestBody); 636 //m_log.DebugFormat("[OGP]: {0}:{1}", request.RawUrl, requestBody);
637 response.KeepAlive = false; 637 response.KeepAlive = true;
638 638
639 LLSD llsdRequest = null; 639 LLSD llsdRequest = null;
640 LLSD llsdResponse = null; 640 LLSD llsdResponse = null;
@@ -705,7 +705,7 @@ namespace OpenSim.Framework.Servers
705 response.SendChunked = false; 705 response.SendChunked = false;
706 response.ContentLength64 = buffer.Length; 706 response.ContentLength64 = buffer.Length;
707 response.ContentEncoding = Encoding.UTF8; 707 response.ContentEncoding = Encoding.UTF8;
708 response.KeepAlive = false; 708 response.KeepAlive = true;
709 709
710 try 710 try
711 { 711 {
@@ -928,7 +928,7 @@ namespace OpenSim.Framework.Servers
928 { 928 {
929 m_log.Warn("[HTTP-AGENT]: Error - " + e.Message); 929 m_log.Warn("[HTTP-AGENT]: Error - " + e.Message);
930 response.SendChunked = false; 930 response.SendChunked = false;
931 response.KeepAlive = false; 931 response.KeepAlive = true;
932 response.StatusCode = (int)OSHttpStatusCode.ServerErrorInternalError; 932 response.StatusCode = (int)OSHttpStatusCode.ServerErrorInternalError;
933 //response.OutputStream.Close(); 933 //response.OutputStream.Close();
934 try 934 try
@@ -1128,6 +1128,7 @@ namespace OpenSim.Framework.Servers
1128 int responsecode = (int)responsedata["int_response_code"]; 1128 int responsecode = (int)responsedata["int_response_code"];
1129 string responseString = (string)responsedata["str_response_string"]; 1129 string responseString = (string)responsedata["str_response_string"];
1130 string contentType = (string)responsedata["content_type"]; 1130 string contentType = (string)responsedata["content_type"];
1131
1131 if (responsedata.ContainsKey("error_status_text")) 1132 if (responsedata.ContainsKey("error_status_text"))
1132 { 1133 {
1133 response.StatusDescription = (string)responsedata["error_status_text"]; 1134 response.StatusDescription = (string)responsedata["error_status_text"];