aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs39
1 files changed, 35 insertions, 4 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
index a605d09..e5ec94b 100644
--- a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs
@@ -149,9 +149,38 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
149 return RegionStats(httpResponse, scene); 149 return RegionStats(httpResponse, scene);
150 150
151 case "prims": 151 case "prims":
152 return RegionPrims(httpResponse, scene); 152 return RegionPrims(httpResponse, scene, LLVector3.Zero, LLVector3.Zero);
153 } 153 }
154 } 154 }
155
156 if (3 == comps.Length) {
157 switch (comps[1].ToLower())
158 {
159 case "prims":
160 string[] subregion = comps[2].Split(',');
161 if (subregion.Length == 6)
162 {
163 LLVector3 min, max;
164 try
165 {
166 min = new LLVector3((float)Double.Parse(subregion[0]), (float)Double.Parse(subregion[1]), (float)Double.Parse(subregion[2]));
167 max = new LLVector3((float)Double.Parse(subregion[3]), (float)Double.Parse(subregion[4]), (float)Double.Parse(subregion[5]));
168 }
169 catch (Exception e)
170 {
171 return Failure(httpResponse, OSHttpStatusCode.ClientErrorBadRequest,
172 "GET", "invalid subregion parameter");
173 }
174 return RegionPrims(httpResponse, scene, min, max);
175 }
176 else
177 {
178 return Failure(httpResponse, OSHttpStatusCode.ClientErrorBadRequest,
179 "GET", "invalid subregion parameter");
180 }
181 }
182 }
183
155 return Failure(httpResponse, OSHttpStatusCode.ClientErrorBadRequest, 184 return Failure(httpResponse, OSHttpStatusCode.ClientErrorBadRequest,
156 "GET", "too many parameters {0}", param); 185 "GET", "too many parameters {0}", param);
157 } 186 }
@@ -184,10 +213,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions
184 return XmlWriterResult; 213 return XmlWriterResult;
185 } 214 }
186 215
187 protected string RegionPrims(OSHttpResponse httpResponse, Scene scene) 216 protected string RegionPrims(OSHttpResponse httpResponse, Scene scene, LLVector3 min, LLVector3 max)
188 { 217 {
189 return Failure(httpResponse, OSHttpStatusCode.ServerErrorNotImplemented, 218 httpResponse.SendChunked = true;
190 "GET", "prims not implemented"); 219 httpResponse.ContentType = "text/xml";
220 scene.SavePrimsToXml2(new StreamWriter(httpResponse.OutputStream), min, max);
221 return "";
191 } 222 }
192 } 223 }
193} 224}