From 1a47ec082ed541a3af0b7e8bb7d18f564f64335d Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 6 Oct 2010 05:15:47 +0200 Subject: Convert worldview to GET --- .../World/WorldView/WorldViewRequestHandler.cs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs index 5e744bf..bfdcdb4 100644 --- a/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs +++ b/OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs @@ -50,7 +50,7 @@ namespace OpenSim.Region.OptionalModules.World.WorldView protected Object m_RequestLock = new Object(); public WorldViewRequestHandler(WorldViewModule fmodule, string rid) - : base("POST", "/worldview/" + rid) + : base("GET", "/worldview/" + rid) { m_WorldViewModule = fmodule; } @@ -58,24 +58,28 @@ namespace OpenSim.Region.OptionalModules.World.WorldView public override byte[] Handle(string path, Stream requestData, OSHttpRequest httpRequest, OSHttpResponse httpResponse) { - StreamReader sr = new StreamReader(requestData); - string body = sr.ReadToEnd(); - sr.Close(); - body = body.Trim(); + httpResponse.ContentType = "image/jpeg"; + +// StreamReader sr = new StreamReader(requestData); +// string body = sr.ReadToEnd(); +// sr.Close(); +// body = body.Trim(); try { lock (m_RequestLock) { Dictionary request = - ServerUtils.ParseQueryString(body); + new Dictionary(); + foreach (string name in httpRequest.QueryString) + request[name] = httpRequest.QueryString[name]; return SendWorldView(request); } } catch (Exception e) { - m_log.Debug("[WORLDVIEW]: Exception {0}" + e.ToString()); + m_log.Debug("[WORLDVIEW]: Exception: " + e.ToString()); } return new Byte[0]; -- cgit v1.1