aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server
diff options
context:
space:
mode:
authorBlueWall2014-03-27 12:21:38 -0400
committerBlueWall2014-03-27 12:21:38 -0400
commita15282f023548ce6e1c6a728d913999ee120e9c1 (patch)
treeb33a39a66549521fe5782d87378b3b4209822e81 /OpenSim/Server
parentFix issue with user picks creation. The snapshot id is UUID.Zero in new parcels. (diff)
parentLog errors in MakeRequest() as INFO, not ERROR. Some communications problems ... (diff)
downloadopensim-SC-a15282f023548ce6e1c6a728d913999ee120e9c1.zip
opensim-SC-a15282f023548ce6e1c6a728d913999ee120e9c1.tar.gz
opensim-SC-a15282f023548ce6e1c6a728d913999ee120e9c1.tar.bz2
opensim-SC-a15282f023548ce6e1c6a728d913999ee120e9c1.tar.xz
Merge branch 'master' into m_test
Diffstat (limited to 'OpenSim/Server')
-rw-r--r--OpenSim/Server/Handlers/Simulation/AgentHandlers.cs19
1 files changed, 8 insertions, 11 deletions
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
index 4ac477f..9c7f17e 100644
--- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
@@ -232,17 +232,16 @@ namespace OpenSim.Server.Handlers.Simulation
232 httpResponse.KeepAlive = false; 232 httpResponse.KeepAlive = false;
233 Encoding encoding = Encoding.UTF8; 233 Encoding encoding = Encoding.UTF8;
234 234
235 Stream inputStream = null; 235 if (httpRequest.ContentType != "application/json")
236 if (httpRequest.ContentType == "application/x-gzip")
237 inputStream = new GZipStream(request, CompressionMode.Decompress);
238 else if (httpRequest.ContentType == "application/json")
239 inputStream = request;
240 else // no go
241 { 236 {
242 httpResponse.StatusCode = 406; 237 httpResponse.StatusCode = 406;
243 return encoding.GetBytes("false"); 238 return encoding.GetBytes("false");
244 } 239 }
245 240
241 Stream inputStream = request;
242 if ((httpRequest.Headers["Content-Encoding"] == "gzip") || (httpRequest.Headers["X-Content-Encoding"] == "gzip"))
243 inputStream = new GZipStream(inputStream, CompressionMode.Decompress);
244
246 StreamReader reader = new StreamReader(inputStream, encoding); 245 StreamReader reader = new StreamReader(inputStream, encoding);
247 246
248 string requestBody = reader.ReadToEnd(); 247 string requestBody = reader.ReadToEnd();
@@ -433,11 +432,9 @@ namespace OpenSim.Server.Handlers.Simulation
433 keysvals.Add("headers", headervals); 432 keysvals.Add("headers", headervals);
434 keysvals.Add("querystringkeys", querystringkeys); 433 keysvals.Add("querystringkeys", querystringkeys);
435 434
436 Stream inputStream; 435 Stream inputStream = request;
437 if (httpRequest.ContentType == "application/x-gzip") 436 if ((httpRequest.Headers["Content-Encoding"] == "gzip") || (httpRequest.Headers["X-Content-Encoding"] == "gzip"))
438 inputStream = new GZipStream(request, CompressionMode.Decompress); 437 inputStream = new GZipStream(inputStream, CompressionMode.Decompress);
439 else
440 inputStream = request;
441 438
442 Encoding encoding = Encoding.UTF8; 439 Encoding encoding = Encoding.UTF8;
443 StreamReader reader = new StreamReader(inputStream, encoding); 440 StreamReader reader = new StreamReader(inputStream, encoding);