diff options
author | Melanie | 2010-12-09 02:24:12 +0000 |
---|---|---|
committer | Melanie | 2010-12-09 02:24:12 +0000 |
commit | 7fef89847ca909a16d55b1e8e3080d26f823ae95 (patch) | |
tree | 70db9afb60625e42b0f48bd83b06eb8cf9fa736e /OpenSim/Server | |
parent | Plumb a code path for the entity transfer module to ask a destination scene (diff) | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC-7fef89847ca909a16d55b1e8e3080d26f823ae95.zip opensim-SC-7fef89847ca909a16d55b1e8e3080d26f823ae95.tar.gz opensim-SC-7fef89847ca909a16d55b1e8e3080d26f823ae95.tar.bz2 opensim-SC-7fef89847ca909a16d55b1e8e3080d26f823ae95.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Server')
-rw-r--r-- | OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs | 51 |
1 files changed, 31 insertions, 20 deletions
diff --git a/OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs b/OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs index 04ff83f..984b843 100644 --- a/OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs | |||
@@ -84,32 +84,43 @@ namespace OpenSim.Server.Handlers.Simulation | |||
84 | return responsedata; | 84 | return responsedata; |
85 | } | 85 | } |
86 | 86 | ||
87 | // Next, let's parse the verb | 87 | try |
88 | string method = (string)request["http-method"]; | ||
89 | if (method.Equals("POST")) | ||
90 | { | ||
91 | DoObjectPost(request, responsedata, regionID); | ||
92 | return responsedata; | ||
93 | } | ||
94 | else if (method.Equals("PUT")) | ||
95 | { | 88 | { |
96 | DoObjectPut(request, responsedata, regionID); | 89 | // Next, let's parse the verb |
97 | return responsedata; | 90 | string method = (string)request["http-method"]; |
91 | if (method.Equals("POST")) | ||
92 | { | ||
93 | DoObjectPost(request, responsedata, regionID); | ||
94 | return responsedata; | ||
95 | } | ||
96 | else if (method.Equals("PUT")) | ||
97 | { | ||
98 | DoObjectPut(request, responsedata, regionID); | ||
99 | return responsedata; | ||
100 | } | ||
101 | //else if (method.Equals("DELETE")) | ||
102 | //{ | ||
103 | // DoObjectDelete(request, responsedata, agentID, action, regionHandle); | ||
104 | // return responsedata; | ||
105 | //} | ||
106 | else | ||
107 | { | ||
108 | m_log.InfoFormat("[OBJECT HANDLER]: method {0} not supported in object message", method); | ||
109 | responsedata["int_response_code"] = HttpStatusCode.MethodNotAllowed; | ||
110 | responsedata["str_response_string"] = "Method not allowed"; | ||
111 | |||
112 | return responsedata; | ||
113 | } | ||
98 | } | 114 | } |
99 | //else if (method.Equals("DELETE")) | 115 | catch (Exception e) |
100 | //{ | ||
101 | // DoObjectDelete(request, responsedata, agentID, action, regionHandle); | ||
102 | // return responsedata; | ||
103 | //} | ||
104 | else | ||
105 | { | 116 | { |
106 | m_log.InfoFormat("[OBJECT HANDLER]: method {0} not supported in object message", method); | 117 | m_log.WarnFormat("[OBJECT HANDLER]: Caught exception {0}", e.StackTrace); |
107 | responsedata["int_response_code"] = HttpStatusCode.MethodNotAllowed; | 118 | responsedata["int_response_code"] = HttpStatusCode.InternalServerError; |
108 | responsedata["str_response_string"] = "Mthod not allowed"; | 119 | responsedata["str_response_string"] = "Internal server error"; |
109 | 120 | ||
110 | return responsedata; | 121 | return responsedata; |
111 | } | ||
112 | 122 | ||
123 | } | ||
113 | } | 124 | } |
114 | 125 | ||
115 | protected void DoObjectPost(Hashtable request, Hashtable responsedata, UUID regionID) | 126 | protected void DoObjectPost(Hashtable request, Hashtable responsedata, UUID regionID) |