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.
This commit is contained in:
Dr Scofield
2008-10-06 21:59:43 +00:00
parent 348893ccac
commit ad04626737
4 changed files with 108 additions and 207 deletions

View File

@@ -277,7 +277,7 @@ namespace OpenSim.Framework.Servers
}
IRequestHandler requestHandler;
response.KeepAlive = false;
response.KeepAlive = true;
response.SendChunked = false;
string path = request.RawUrl;
@@ -634,7 +634,7 @@ namespace OpenSim.Framework.Servers
requestStream.Close();
//m_log.DebugFormat("[OGP]: {0}:{1}", request.RawUrl, requestBody);
response.KeepAlive = false;
response.KeepAlive = true;
LLSD llsdRequest = null;
LLSD llsdResponse = null;
@@ -705,7 +705,7 @@ namespace OpenSim.Framework.Servers
response.SendChunked = false;
response.ContentLength64 = buffer.Length;
response.ContentEncoding = Encoding.UTF8;
response.KeepAlive = false;
response.KeepAlive = true;
try
{
@@ -928,7 +928,7 @@ namespace OpenSim.Framework.Servers
{
m_log.Warn("[HTTP-AGENT]: Error - " + e.Message);
response.SendChunked = false;
response.KeepAlive = false;
response.KeepAlive = true;
response.StatusCode = (int)OSHttpStatusCode.ServerErrorInternalError;
//response.OutputStream.Close();
try
@@ -1128,6 +1128,7 @@ namespace OpenSim.Framework.Servers
int responsecode = (int)responsedata["int_response_code"];
string responseString = (string)responsedata["str_response_string"];
string contentType = (string)responsedata["content_type"];
if (responsedata.ContainsKey("error_status_text"))
{
response.StatusDescription = (string)responsedata["error_status_text"];