aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers
diff options
context:
space:
mode:
authorDiva Canto2010-12-07 20:05:53 -0800
committerDiva Canto2010-12-07 20:05:53 -0800
commit796216e44ff78b1088f9a977b810f16d98855f37 (patch)
tree66af8be45e13cfbff46f0fb2065eed6981a02b69 /OpenSim/Server/Handlers
parentRemoved extraneous left-/ on /object/ subpath. Bug introduced during region U... (diff)
downloadopensim-SC_OLD-796216e44ff78b1088f9a977b810f16d98855f37.zip
opensim-SC_OLD-796216e44ff78b1088f9a977b810f16d98855f37.tar.gz
opensim-SC_OLD-796216e44ff78b1088f9a977b810f16d98855f37.tar.bz2
opensim-SC_OLD-796216e44ff78b1088f9a977b810f16d98855f37.tar.xz
Added an exception handler on CreateObject handler, just in case there's an exception being thrown that is silently being ignored by the http server. (Trying to catch Melanie's problem with attachments on TPs)
Diffstat (limited to 'OpenSim/Server/Handlers')
-rw-r--r--OpenSim/Server/Handlers/Simulation/ObjectHandlers.cs51
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)