Revert "Functional improvement: close the stream. Non-functional: add debug messages to find out why updates are getting an error. WARNING: MASSIVE CONSOLE SPAM ON TPs."

This reverts commit 5548f83750.
bulletsim
Diva Canto 2011-05-11 13:15:27 -07:00
parent af2e12d2b4
commit 7fa2489a6e
1 changed files with 2 additions and 19 deletions

View File

@ -461,10 +461,7 @@ namespace OpenSim.Server.Handlers.Simulation
Stream inputStream; Stream inputStream;
if (httpRequest.ContentType == "application/x-gzip") if (httpRequest.ContentType == "application/x-gzip")
{
m_log.DebugFormat("[XXX]: Update called with application/x-gzip");
inputStream = new GZipStream(request, CompressionMode.Decompress); inputStream = new GZipStream(request, CompressionMode.Decompress);
}
else else
{ {
m_log.DebugFormat("[XXX]: Update called with {0}", httpRequest.ContentType); m_log.DebugFormat("[XXX]: Update called with {0}", httpRequest.ContentType);
@ -474,22 +471,8 @@ namespace OpenSim.Server.Handlers.Simulation
Encoding encoding = Encoding.UTF8; Encoding encoding = Encoding.UTF8;
StreamReader reader = new StreamReader(inputStream, encoding); StreamReader reader = new StreamReader(inputStream, encoding);
try string requestBody = reader.ReadToEnd();
{ keysvals.Add("body", requestBody);
string requestBody = reader.ReadToEnd();
m_log.DebugFormat("[XXX] body {0}", requestBody);
keysvals.Add("body", requestBody);
}
catch (Exception e)
{
m_log.DebugFormat("[AGENT HANDLER]: Exception readin gzip stream: {0}", e);
httpResponse.StatusCode = (int)HttpStatusCode.BadRequest;
return new byte[0];
}
finally
{
reader.Close();
}
httpResponse.StatusCode = 200; httpResponse.StatusCode = 200;
httpResponse.ContentType = "text/html"; httpResponse.ContentType = "text/html";