diff options
author | Jeff Ames | 2008-05-25 23:27:38 +0000 |
---|---|---|
committer | Jeff Ames | 2008-05-25 23:27:38 +0000 |
commit | 5d77625e9ac4ce1fc7b8fd67aabf563678ef0d5d (patch) | |
tree | b010c015ac515fe2a3dd0c9f89c16cbc6383d685 /OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs | |
parent | * A hacky Top Scripts display. It isn't accurate as far as ms accounting, ho... (diff) | |
download | opensim-SC_OLD-5d77625e9ac4ce1fc7b8fd67aabf563678ef0d5d.zip opensim-SC_OLD-5d77625e9ac4ce1fc7b8fd67aabf563678ef0d5d.tar.gz opensim-SC_OLD-5d77625e9ac4ce1fc7b8fd67aabf563678ef0d5d.tar.bz2 opensim-SC_OLD-5d77625e9ac4ce1fc7b8fd67aabf563678ef0d5d.tar.xz |
Update svn properties. Formatting cleanup.
Diffstat (limited to 'OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs')
-rw-r--r-- | OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs | 65 |
1 files changed, 32 insertions, 33 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs index b89976f..81eb5bd 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs | |||
@@ -1,30 +1,29 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | */ |
27 | */ | ||
28 | 27 | ||
29 | using System; | 28 | using System; |
30 | using System.Threading; | 29 | using System.Threading; |
@@ -54,10 +53,10 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
54 | public partial class RestRegionPlugin : RestPlugin | 53 | public partial class RestRegionPlugin : RestPlugin |
55 | { | 54 | { |
56 | #region GET methods | 55 | #region GET methods |
57 | public string GetHandler(string request, string path, string param, | 56 | public string GetHandler(string request, string path, string param, |
58 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 57 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
59 | { | 58 | { |
60 | // foreach (string h in httpRequest.Headers.AllKeys) | 59 | // foreach (string h in httpRequest.Headers.AllKeys) |
61 | // foreach (string v in httpRequest.Headers.GetValues(h)) | 60 | // foreach (string v in httpRequest.Headers.GetValues(h)) |
62 | // m_log.DebugFormat("{0} IsGod: {1} -> {2}", MsgID, h, v); | 61 | // m_log.DebugFormat("{0} IsGod: {1} -> {2}", MsgID, h, v); |
63 | 62 | ||
@@ -72,7 +71,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
72 | // param not empty: specific region | 71 | // param not empty: specific region |
73 | return GetHandlerRegion(httpResponse, param); | 72 | return GetHandlerRegion(httpResponse, param); |
74 | } | 73 | } |
75 | catch (Exception e) | 74 | catch (Exception e) |
76 | { | 75 | { |
77 | return Failure(httpResponse, OSHttpStatusCode.ServerErrorInternalError, "GET", e); | 76 | return Failure(httpResponse, OSHttpStatusCode.ServerErrorInternalError, "GET", e); |
78 | } | 77 | } |
@@ -88,7 +87,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
88 | XmlWriter.WriteEndElement(); | 87 | XmlWriter.WriteEndElement(); |
89 | } | 88 | } |
90 | XmlWriter.WriteEndElement(); | 89 | XmlWriter.WriteEndElement(); |
91 | 90 | ||
92 | return XmlWriterResult; | 91 | return XmlWriterResult; |
93 | } | 92 | } |
94 | 93 | ||
@@ -141,7 +140,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
141 | // m_log.DebugFormat("{0} GET comps advanced: >{1}<", MsgID, comps[1]); | 140 | // m_log.DebugFormat("{0} GET comps advanced: >{1}<", MsgID, comps[1]); |
142 | 141 | ||
143 | // check for {terrain,stats,prims} | 142 | // check for {terrain,stats,prims} |
144 | switch (comps[1].ToLower()) | 143 | switch (comps[1].ToLower()) |
145 | { | 144 | { |
146 | case "terrain": | 145 | case "terrain": |
147 | return RegionTerrain(httpResponse, scene); | 146 | return RegionTerrain(httpResponse, scene); |
@@ -175,13 +174,13 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions | |||
175 | XmlWriter.WriteStartElement(String.Empty, "users", String.Empty); | 174 | XmlWriter.WriteStartElement(String.Empty, "users", String.Empty); |
176 | XmlWriter.WriteString(users.ToString()); | 175 | XmlWriter.WriteString(users.ToString()); |
177 | XmlWriter.WriteEndElement(); | 176 | XmlWriter.WriteEndElement(); |
178 | 177 | ||
179 | XmlWriter.WriteStartElement(String.Empty, "objects", String.Empty); | 178 | XmlWriter.WriteStartElement(String.Empty, "objects", String.Empty); |
180 | XmlWriter.WriteString(objects.ToString()); | 179 | XmlWriter.WriteString(objects.ToString()); |
181 | XmlWriter.WriteEndElement(); | 180 | XmlWriter.WriteEndElement(); |
182 | 181 | ||
183 | XmlWriter.WriteEndDocument(); | 182 | XmlWriter.WriteEndDocument(); |
184 | 183 | ||
185 | return XmlWriterResult; | 184 | return XmlWriterResult; |
186 | } | 185 | } |
187 | 186 | ||