diff options
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
Diffstat (limited to 'OpenSim/Server/Handlers/Simulation/AgentHandlers.cs')
-rw-r--r-- | OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index ded335d5..8f6fa52 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | |||
@@ -295,23 +295,28 @@ namespace OpenSim.Server.Handlers.Simulation | |||
295 | keysvals.Add("headers", headervals); | 295 | keysvals.Add("headers", headervals); |
296 | keysvals.Add("querystringkeys", querystringkeys); | 296 | keysvals.Add("querystringkeys", querystringkeys); |
297 | 297 | ||
298 | Stream inputStream; | 298 | httpResponse.StatusCode = 200; |
299 | httpResponse.ContentType = "text/html"; | ||
300 | httpResponse.KeepAlive = false; | ||
301 | Encoding encoding = Encoding.UTF8; | ||
302 | |||
303 | Stream inputStream = null; | ||
299 | if (httpRequest.ContentType == "application/x-gzip") | 304 | if (httpRequest.ContentType == "application/x-gzip") |
300 | inputStream = new GZipStream(request, CompressionMode.Decompress); | 305 | inputStream = new GZipStream(request, CompressionMode.Decompress); |
301 | else | 306 | else if (httpRequest.ContentType == "application/json") |
302 | inputStream = request; | 307 | inputStream = request; |
308 | else // no go | ||
309 | { | ||
310 | httpResponse.StatusCode = 406; | ||
311 | return encoding.GetBytes("false"); | ||
312 | } | ||
303 | 313 | ||
304 | Encoding encoding = Encoding.UTF8; | ||
305 | StreamReader reader = new StreamReader(inputStream, encoding); | 314 | StreamReader reader = new StreamReader(inputStream, encoding); |
306 | 315 | ||
307 | string requestBody = reader.ReadToEnd(); | 316 | string requestBody = reader.ReadToEnd(); |
308 | reader.Close(); | 317 | reader.Close(); |
309 | keysvals.Add("body", requestBody); | 318 | keysvals.Add("body", requestBody); |
310 | 319 | ||
311 | httpResponse.StatusCode = 200; | ||
312 | httpResponse.ContentType = "text/html"; | ||
313 | httpResponse.KeepAlive = false; | ||
314 | |||
315 | Hashtable responsedata = new Hashtable(); | 320 | Hashtable responsedata = new Hashtable(); |
316 | 321 | ||
317 | UUID agentID; | 322 | UUID agentID; |