aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Server/Handlers/Simulation/AgentHandlers.cs19
1 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
index 1d1f9ef..5c9be8f 100644
--- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
+++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
@@ -272,23 +272,28 @@ namespace OpenSim.Server.Handlers.Simulation
272 keysvals.Add("headers", headervals); 272 keysvals.Add("headers", headervals);
273 keysvals.Add("querystringkeys", querystringkeys); 273 keysvals.Add("querystringkeys", querystringkeys);
274 274
275 Stream inputStream; 275 httpResponse.StatusCode = 200;
276 httpResponse.ContentType = "text/html";
277 httpResponse.KeepAlive = false;
278 Encoding encoding = Encoding.UTF8;
279
280 Stream inputStream = null;
276 if (httpRequest.ContentType == "application/x-gzip") 281 if (httpRequest.ContentType == "application/x-gzip")
277 inputStream = new GZipStream(request, CompressionMode.Decompress); 282 inputStream = new GZipStream(request, CompressionMode.Decompress);
278 else 283 else if (httpRequest.ContentType == "application/json")
279 inputStream = request; 284 inputStream = request;
285 else // no go
286 {
287 httpResponse.StatusCode = 406;
288 return encoding.GetBytes("false");
289 }
280 290
281 Encoding encoding = Encoding.UTF8;
282 StreamReader reader = new StreamReader(inputStream, encoding); 291 StreamReader reader = new StreamReader(inputStream, encoding);
283 292
284 string requestBody = reader.ReadToEnd(); 293 string requestBody = reader.ReadToEnd();
285 reader.Close(); 294 reader.Close();
286 keysvals.Add("body", requestBody); 295 keysvals.Add("body", requestBody);
287 296
288 httpResponse.StatusCode = 200;
289 httpResponse.ContentType = "text/html";
290 httpResponse.KeepAlive = false;
291
292 Hashtable responsedata = new Hashtable(); 297 Hashtable responsedata = new Hashtable();
293 298
294 UUID agentID; 299 UUID agentID;