aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2010-10-06 05:15:47 +0200
committerMelanie2010-10-06 05:17:31 +0100
commit9a1c8db443ee1de3a0153b4ea177280b8036cf6f (patch)
tree1e0e18e3d6d5064f408da0fff2ba6bb8702a6e50
parentChange the URL /worldview to /worldview/<region id> to support multiregion (diff)
downloadopensim-SC_OLD-9a1c8db443ee1de3a0153b4ea177280b8036cf6f.zip
opensim-SC_OLD-9a1c8db443ee1de3a0153b4ea177280b8036cf6f.tar.gz
opensim-SC_OLD-9a1c8db443ee1de3a0153b4ea177280b8036cf6f.tar.bz2
opensim-SC_OLD-9a1c8db443ee1de3a0153b4ea177280b8036cf6f.tar.xz
Convert worldview to GET
-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];