aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server/Handlers/Simulation/AgentHandlers.cs')
-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";