aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules
diff options
context:
space:
mode:
authorMelanie2010-10-06 05:15:47 +0200
committerMelanie2010-10-06 05:15:47 +0200
commit1a47ec082ed541a3af0b7e8bb7d18f564f64335d (patch)
tree3aae52546ea4c04216454b968a216e324ebf83a4 /OpenSim/Region/OptionalModules
parentMerge branch 'master' into careminster-presence-refactor (diff)
downloadopensim-SC-1a47ec082ed541a3af0b7e8bb7d18f564f64335d.zip
opensim-SC-1a47ec082ed541a3af0b7e8bb7d18f564f64335d.tar.gz
opensim-SC-1a47ec082ed541a3af0b7e8bb7d18f564f64335d.tar.bz2
opensim-SC-1a47ec082ed541a3af0b7e8bb7d18f564f64335d.tar.xz
Convert worldview to GET
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/World/WorldView/WorldViewRequestHandler.cs18
1 files changed, 11 insertions, 7 deletions
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
50 protected Object m_RequestLock = new Object(); 50 protected Object m_RequestLock = new Object();
51 51
52 public WorldViewRequestHandler(WorldViewModule fmodule, string rid) 52 public WorldViewRequestHandler(WorldViewModule fmodule, string rid)
53 : base("POST", "/worldview/" + rid) 53 : base("GET", "/worldview/" + rid)
54 { 54 {
55 m_WorldViewModule = fmodule; 55 m_WorldViewModule = fmodule;
56 } 56 }
@@ -58,24 +58,28 @@ namespace OpenSim.Region.OptionalModules.World.WorldView
58 public override byte[] Handle(string path, Stream requestData, 58 public override byte[] Handle(string path, Stream requestData,
59 OSHttpRequest httpRequest, OSHttpResponse httpResponse) 59 OSHttpRequest httpRequest, OSHttpResponse httpResponse)
60 { 60 {
61 StreamReader sr = new StreamReader(requestData); 61 httpResponse.ContentType = "image/jpeg";
62 string body = sr.ReadToEnd(); 62
63 sr.Close(); 63// StreamReader sr = new StreamReader(requestData);
64 body = body.Trim(); 64// string body = sr.ReadToEnd();
65// sr.Close();
66// body = body.Trim();
65 67
66 try 68 try
67 { 69 {
68 lock (m_RequestLock) 70 lock (m_RequestLock)
69 { 71 {
70 Dictionary<string, object> request = 72 Dictionary<string, object> request =
71 ServerUtils.ParseQueryString(body); 73 new Dictionary<string, object>();
74 foreach (string name in httpRequest.QueryString)
75 request[name] = httpRequest.QueryString[name];
72 76
73 return SendWorldView(request); 77 return SendWorldView(request);
74 } 78 }
75 } 79 }
76 catch (Exception e) 80 catch (Exception e)
77 { 81 {
78 m_log.Debug("[WORLDVIEW]: Exception {0}" + e.ToString()); 82 m_log.Debug("[WORLDVIEW]: Exception: " + e.ToString());
79 } 83 }
80 84
81 return new Byte[0]; 85 return new Byte[0];