aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers
diff options
context:
space:
mode:
authorDiva Canto2011-05-11 10:21:42 -0700
committerDiva Canto2011-05-11 10:21:42 -0700
commit5548f837501184d68c352097ad1a1de566e18ca0 (patch)
treee3c6e5310c4019b7e2fd9deb87d41053b9bfba80 /OpenSim/Server/Handlers
parentSomewhat reverting the last commit. The viewer ignores 255's on tiles that we... (diff)
downloadopensim-SC_OLD-5548f837501184d68c352097ad1a1de566e18ca0.zip
opensim-SC_OLD-5548f837501184d68c352097ad1a1de566e18ca0.tar.gz
opensim-SC_OLD-5548f837501184d68c352097ad1a1de566e18ca0.tar.bz2
opensim-SC_OLD-5548f837501184d68c352097ad1a1de566e18ca0.tar.xz
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.
Diffstat (limited to 'OpenSim/Server/Handlers')
-rw-r--r--OpenSim/Server/Handlers/Simulation/AgentHandlers.cs21
1 files changed, 19 insertions, 2 deletions
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
index 379924f..f938e4b 100644
--- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
@@ -461,15 +461,32 @@ namespace OpenSim.Server.Handlers.Simulation
461 461
462 Stream inputStream; 462 Stream inputStream;
463 if (httpRequest.ContentType == "application/x-gzip") 463 if (httpRequest.ContentType == "application/x-gzip")
464 {
465 m_log.DebugFormat("[XXX]: Update called with application/x-gzip");
464 inputStream = new GZipStream(request, CompressionMode.Decompress); 466 inputStream = new GZipStream(request, CompressionMode.Decompress);
467 }
465 else 468 else
466 inputStream = request; 469 inputStream = request;
467 470
468 Encoding encoding = Encoding.UTF8; 471 Encoding encoding = Encoding.UTF8;
469 StreamReader reader = new StreamReader(inputStream, encoding); 472 StreamReader reader = new StreamReader(inputStream, encoding);
470 473
471 string requestBody = reader.ReadToEnd(); 474 try
472 keysvals.Add("body", requestBody); 475 {
476 string requestBody = reader.ReadToEnd();
477 m_log.DebugFormat("[XXX] body {0}", requestBody);
478 keysvals.Add("body", requestBody);
479 }
480 catch (Exception e)
481 {
482 m_log.DebugFormat("[AGENT HANDLER]: Exception readin gzip stream: {0}", e);
483 httpResponse.StatusCode = (int)HttpStatusCode.BadRequest;
484 return new byte[0];
485 }
486 finally
487 {
488 reader.Close();
489 }
473 490
474 httpResponse.StatusCode = 200; 491 httpResponse.StatusCode = 200;
475 httpResponse.ContentType = "text/html"; 492 httpResponse.ContentType = "text/html";