diff options
author | Melanie | 2013-07-18 10:08:10 +0100 |
---|---|---|
committer | Melanie | 2013-07-18 10:08:10 +0100 |
commit | 7830cc995471120892a24a39e86283774fa07c4c (patch) | |
tree | d3f46b4f3ce95bb8572511c6f12c9f8ca86922c8 /OpenSim/Server | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Document obscure Groups config related to the user level required for creatin... (diff) | |
download | opensim-SC-7830cc995471120892a24a39e86283774fa07c4c.zip opensim-SC-7830cc995471120892a24a39e86283774fa07c4c.tar.gz opensim-SC-7830cc995471120892a24a39e86283774fa07c4c.tar.bz2 opensim-SC-7830cc995471120892a24a39e86283774fa07c4c.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs
OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs
OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
OpenSim/Region/CoreModules/Framework/Caps/CapabilitiesModule.cs
OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
OpenSim/Region/CoreModules/ServiceConnectorsOut/Simulation/LocalSimulationConnector.cs
OpenSim/Region/Framework/Scenes/Scene.cs
OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
OpenSim/Region/Framework/Scenes/ScenePresence.cs
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
OpenSim/Server/Handlers/Simulation/AgentHandlers.cs
OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs
OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
OpenSim/Services/HypergridService/UserAgentService.cs
Diffstat (limited to 'OpenSim/Server')
21 files changed, 50 insertions, 128 deletions
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs b/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs index 986394b..941b97d 100644 --- a/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs +++ b/OpenSim/Server/Handlers/Asset/AssetServerDeleteHandler.cs | |||
@@ -70,7 +70,7 @@ namespace OpenSim.Server.Handlers.Asset | |||
70 | m_allowedTypes = allowedTypes; | 70 | m_allowedTypes = allowedTypes; |
71 | } | 71 | } |
72 | 72 | ||
73 | public override byte[] Handle(string path, Stream request, | 73 | protected override byte[] ProcessRequest(string path, Stream request, |
74 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 74 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
75 | { | 75 | { |
76 | bool result = false; | 76 | bool result = false; |
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs b/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs index 8f7412b..8b23a83 100644 --- a/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs +++ b/OpenSim/Server/Handlers/Asset/AssetServerGetHandler.cs | |||
@@ -54,7 +54,7 @@ namespace OpenSim.Server.Handlers.Asset | |||
54 | m_AssetService = service; | 54 | m_AssetService = service; |
55 | } | 55 | } |
56 | 56 | ||
57 | public override byte[] Handle(string path, Stream request, | 57 | protected override byte[] ProcessRequest(string path, Stream request, |
58 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 58 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
59 | { | 59 | { |
60 | byte[] result = new byte[0]; | 60 | byte[] result = new byte[0]; |
diff --git a/OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs b/OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs index a006fa8..8eebc61 100644 --- a/OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Asset/AssetServerPostHandler.cs | |||
@@ -54,7 +54,7 @@ namespace OpenSim.Server.Handlers.Asset | |||
54 | m_AssetService = service; | 54 | m_AssetService = service; |
55 | } | 55 | } |
56 | 56 | ||
57 | public override byte[] Handle(string path, Stream request, | 57 | protected override byte[] ProcessRequest(string path, Stream request, |
58 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 58 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
59 | { | 59 | { |
60 | AssetBase asset; | 60 | AssetBase asset; |
diff --git a/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs b/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs index 6b93cd9..16e011a 100644 --- a/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs | |||
@@ -70,7 +70,7 @@ namespace OpenSim.Server.Handlers.Authentication | |||
70 | } | 70 | } |
71 | } | 71 | } |
72 | 72 | ||
73 | public override byte[] Handle(string path, Stream request, | 73 | protected override byte[] ProcessRequest(string path, Stream request, |
74 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 74 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
75 | { | 75 | { |
76 | string[] p = SplitParams(path); | 76 | string[] p = SplitParams(path); |
diff --git a/OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs b/OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs index 18cef15..66a26fc 100644 --- a/OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs +++ b/OpenSim/Server/Handlers/Authentication/OpenIdServerHandler.cs | |||
@@ -147,7 +147,7 @@ namespace OpenSim.Server.Handlers.Authentication | |||
147 | #endregion | 147 | #endregion |
148 | } | 148 | } |
149 | 149 | ||
150 | public class OpenIdStreamHandler : IStreamHandler | 150 | public class OpenIdStreamHandler : BaseOutputStreamHandler |
151 | { | 151 | { |
152 | #region HTML | 152 | #region HTML |
153 | 153 | ||
@@ -191,42 +191,34 @@ For more information, see <a href='http://openid.net/'>http://openid.net/</a>. | |||
191 | 191 | ||
192 | #endregion HTML | 192 | #endregion HTML |
193 | 193 | ||
194 | public string Name { get { return "OpenId"; } } | ||
195 | public string Description { get { return null; } } | ||
196 | public string ContentType { get { return m_contentType; } } | ||
197 | public string HttpMethod { get { return m_httpMethod; } } | ||
198 | public string Path { get { return m_path; } } | ||
199 | |||
200 | string m_contentType; | ||
201 | string m_httpMethod; | ||
202 | string m_path; | ||
203 | IAuthenticationService m_authenticationService; | 194 | IAuthenticationService m_authenticationService; |
204 | IUserAccountService m_userAccountService; | 195 | IUserAccountService m_userAccountService; |
205 | ProviderMemoryStore m_openidStore = new ProviderMemoryStore(); | 196 | ProviderMemoryStore m_openidStore = new ProviderMemoryStore(); |
206 | 197 | ||
198 | public override string ContentType { get { return "text/html"; } } | ||
199 | |||
207 | /// <summary> | 200 | /// <summary> |
208 | /// Constructor | 201 | /// Constructor |
209 | /// </summary> | 202 | /// </summary> |
210 | public OpenIdStreamHandler(string httpMethod, string path, IUserAccountService userService, IAuthenticationService authService) | 203 | public OpenIdStreamHandler( |
204 | string httpMethod, string path, IUserAccountService userService, IAuthenticationService authService) | ||
205 | : base(httpMethod, path, "OpenId", "OpenID stream handler") | ||
211 | { | 206 | { |
212 | m_authenticationService = authService; | 207 | m_authenticationService = authService; |
213 | m_userAccountService = userService; | 208 | m_userAccountService = userService; |
214 | m_httpMethod = httpMethod; | ||
215 | m_path = path; | ||
216 | |||
217 | m_contentType = "text/html"; | ||
218 | } | 209 | } |
219 | 210 | ||
220 | /// <summary> | 211 | /// <summary> |
221 | /// Handles all GET and POST requests for OpenID identifier pages and endpoint | 212 | /// Handles all GET and POST requests for OpenID identifier pages and endpoint |
222 | /// server communication | 213 | /// server communication |
223 | /// </summary> | 214 | /// </summary> |
224 | public void Handle(string path, Stream request, Stream response, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 215 | protected override void ProcessRequest( |
216 | string path, Stream request, Stream response, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | ||
225 | { | 217 | { |
226 | Uri providerEndpoint = new Uri(String.Format("{0}://{1}{2}", httpRequest.Url.Scheme, httpRequest.Url.Authority, httpRequest.Url.AbsolutePath)); | 218 | Uri providerEndpoint = new Uri(String.Format("{0}://{1}{2}", httpRequest.Url.Scheme, httpRequest.Url.Authority, httpRequest.Url.AbsolutePath)); |
227 | 219 | ||
228 | // Defult to returning HTML content | 220 | // Defult to returning HTML content |
229 | m_contentType = "text/html"; | 221 | httpResponse.ContentType = ContentType; |
230 | 222 | ||
231 | try | 223 | try |
232 | { | 224 | { |
@@ -276,7 +268,7 @@ For more information, see <a href='http://openid.net/'>http://openid.net/</a>. | |||
276 | 268 | ||
277 | string[] contentTypeValues = provider.Request.Response.Headers.GetValues("Content-Type"); | 269 | string[] contentTypeValues = provider.Request.Response.Headers.GetValues("Content-Type"); |
278 | if (contentTypeValues != null && contentTypeValues.Length == 1) | 270 | if (contentTypeValues != null && contentTypeValues.Length == 1) |
279 | m_contentType = contentTypeValues[0]; | 271 | httpResponse.ContentType = contentTypeValues[0]; |
280 | 272 | ||
281 | // Set the response code and document body based on the OpenID result | 273 | // Set the response code and document body based on the OpenID result |
282 | httpResponse.StatusCode = (int)provider.Request.Response.Code; | 274 | httpResponse.StatusCode = (int)provider.Request.Response.Code; |
@@ -344,4 +336,4 @@ For more information, see <a href='http://openid.net/'>http://openid.net/</a>. | |||
344 | return false; | 336 | return false; |
345 | } | 337 | } |
346 | } | 338 | } |
347 | } | 339 | } \ No newline at end of file |
diff --git a/OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs b/OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs index bcf9d47..c9b4e9b 100644 --- a/OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Authorization/AuthorizationServerPostHandler.cs | |||
@@ -54,7 +54,7 @@ namespace OpenSim.Server.Handlers.Authorization | |||
54 | m_AuthorizationService = service; | 54 | m_AuthorizationService = service; |
55 | } | 55 | } |
56 | 56 | ||
57 | public override byte[] Handle(string path, Stream request, | 57 | protected override byte[] ProcessRequest(string path, Stream request, |
58 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 58 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
59 | { | 59 | { |
60 | XmlSerializer xs = new XmlSerializer(typeof (AuthorizationRequest)); | 60 | XmlSerializer xs = new XmlSerializer(typeof (AuthorizationRequest)); |
diff --git a/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs b/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs index 8cd747e..d6bbb8f 100644 --- a/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Avatar/AvatarServerPostHandler.cs | |||
@@ -56,7 +56,7 @@ namespace OpenSim.Server.Handlers.Avatar | |||
56 | m_AvatarService = service; | 56 | m_AvatarService = service; |
57 | } | 57 | } |
58 | 58 | ||
59 | public override byte[] Handle(string path, Stream requestData, | 59 | protected override byte[] ProcessRequest(string path, Stream requestData, |
60 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 60 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
61 | { | 61 | { |
62 | StreamReader sr = new StreamReader(requestData); | 62 | StreamReader sr = new StreamReader(requestData); |
diff --git a/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs b/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs index 47a8558..ca0a24c 100644 --- a/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs | |||
@@ -57,7 +57,7 @@ namespace OpenSim.Server.Handlers.Friends | |||
57 | m_FriendsService = service; | 57 | m_FriendsService = service; |
58 | } | 58 | } |
59 | 59 | ||
60 | public override byte[] Handle(string path, Stream requestData, | 60 | protected override byte[] ProcessRequest(string path, Stream requestData, |
61 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 61 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
62 | { | 62 | { |
63 | StreamReader sr = new StreamReader(requestData); | 63 | StreamReader sr = new StreamReader(requestData); |
diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index ef5f33e..89cba8a 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | |||
@@ -57,7 +57,7 @@ namespace OpenSim.Server.Handlers.Grid | |||
57 | m_GridService = service; | 57 | m_GridService = service; |
58 | } | 58 | } |
59 | 59 | ||
60 | public override byte[] Handle(string path, Stream requestData, | 60 | protected override byte[] ProcessRequest(string path, Stream requestData, |
61 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 61 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
62 | { | 62 | { |
63 | StreamReader sr = new StreamReader(requestData); | 63 | StreamReader sr = new StreamReader(requestData); |
diff --git a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs index 7483395..0b98e9a 100644 --- a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs +++ b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs | |||
@@ -56,7 +56,7 @@ namespace OpenSim.Server.Handlers.GridUser | |||
56 | m_GridUserService = service; | 56 | m_GridUserService = service; |
57 | } | 57 | } |
58 | 58 | ||
59 | public override byte[] Handle(string path, Stream requestData, | 59 | protected override byte[] ProcessRequest(string path, Stream requestData, |
60 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 60 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
61 | { | 61 | { |
62 | StreamReader sr = new StreamReader(requestData); | 62 | StreamReader sr = new StreamReader(requestData); |
diff --git a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs index 0aa2729..a2bdadb 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs | |||
@@ -68,7 +68,7 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
68 | m_log.ErrorFormat("[HGFRIENDS HANDLER]: TheService is null!"); | 68 | m_log.ErrorFormat("[HGFRIENDS HANDLER]: TheService is null!"); |
69 | } | 69 | } |
70 | 70 | ||
71 | public override byte[] Handle(string path, Stream requestData, | 71 | protected override byte[] ProcessRequest(string path, Stream requestData, |
72 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 72 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
73 | { | 73 | { |
74 | StreamReader sr = new StreamReader(requestData); | 74 | StreamReader sr = new StreamReader(requestData); |
diff --git a/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs index f306b1c..06eaf2e 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HeloServerConnector.cs | |||
@@ -91,7 +91,7 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
91 | m_HandlersType = handlersType; | 91 | m_HandlersType = handlersType; |
92 | } | 92 | } |
93 | 93 | ||
94 | public override byte[] Handle(string path, Stream requestData, | 94 | protected override byte[] ProcessRequest(string path, Stream requestData, |
95 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 95 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
96 | { | 96 | { |
97 | return OKResponse(httpResponse); | 97 | return OKResponse(httpResponse); |
diff --git a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs index df875af..f37f2f1 100644 --- a/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs +++ b/OpenSim/Server/Handlers/Hypergrid/HomeAgentHandlers.cs | |||
@@ -68,6 +68,7 @@ namespace OpenSim.Server.Handlers.Hypergrid | |||
68 | { | 68 | { |
69 | return new ExtendedAgentDestinationData(); | 69 | return new ExtendedAgentDestinationData(); |
70 | } | 70 | } |
71 | |||
71 | protected override void UnpackData(OSDMap args, AgentDestinationData d, Hashtable request) | 72 | protected override void UnpackData(OSDMap args, AgentDestinationData d, Hashtable request) |
72 | { | 73 | { |
73 | base.UnpackData(args, d, request); | 74 | base.UnpackData(args, d, request); |
diff --git a/OpenSim/Server/Handlers/Inventory/InventoryServerMoveItemsHandler.cs b/OpenSim/Server/Handlers/Inventory/InventoryServerMoveItemsHandler.cs index 231e32f..e2c50fe 100644 --- a/OpenSim/Server/Handlers/Inventory/InventoryServerMoveItemsHandler.cs +++ b/OpenSim/Server/Handlers/Inventory/InventoryServerMoveItemsHandler.cs | |||
@@ -56,7 +56,7 @@ namespace OpenSim.Server.Handlers.Inventory | |||
56 | m_InventoryService = service; | 56 | m_InventoryService = service; |
57 | } | 57 | } |
58 | 58 | ||
59 | public override byte[] Handle(string path, Stream request, | 59 | protected override byte[] ProcessRequest(string path, Stream request, |
60 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 60 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
61 | { | 61 | { |
62 | XmlSerializer xs = new XmlSerializer(typeof (List<InventoryItemBase>)); | 62 | XmlSerializer xs = new XmlSerializer(typeof (List<InventoryItemBase>)); |
diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs index 9d28dc3..0d7c136 100644 --- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs +++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs | |||
@@ -87,7 +87,7 @@ namespace OpenSim.Server.Handlers.Asset | |||
87 | m_InventoryService = service; | 87 | m_InventoryService = service; |
88 | } | 88 | } |
89 | 89 | ||
90 | public override byte[] Handle(string path, Stream requestData, | 90 | protected override byte[] ProcessRequest(string path, Stream requestData, |
91 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 91 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
92 | { | 92 | { |
93 | StreamReader sr = new StreamReader(requestData); | 93 | StreamReader sr = new StreamReader(requestData); |
diff --git a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs index 4a61969..d438fc7 100644 --- a/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs +++ b/OpenSim/Server/Handlers/Map/MapAddServerConnector.cs | |||
@@ -99,7 +99,7 @@ namespace OpenSim.Server.Handlers.MapImage | |||
99 | m_Proxy = proxy; | 99 | m_Proxy = proxy; |
100 | } | 100 | } |
101 | 101 | ||
102 | public override byte[] Handle(string path, Stream requestData, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 102 | protected override byte[] ProcessRequest(string path, Stream requestData, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
103 | { | 103 | { |
104 | // m_log.DebugFormat("[MAP SERVICE IMAGE HANDLER]: Received {0}", path); | 104 | // m_log.DebugFormat("[MAP SERVICE IMAGE HANDLER]: Received {0}", path); |
105 | StreamReader sr = new StreamReader(requestData); | 105 | StreamReader sr = new StreamReader(requestData); |
diff --git a/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs b/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs index 4502b7d..bd1ddbd 100644 --- a/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs +++ b/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs | |||
@@ -83,7 +83,7 @@ namespace OpenSim.Server.Handlers.MapImage | |||
83 | m_MapService = service; | 83 | m_MapService = service; |
84 | } | 84 | } |
85 | 85 | ||
86 | public override byte[] Handle(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 86 | protected override byte[] ProcessRequest(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
87 | { | 87 | { |
88 | ev.WaitOne(); | 88 | ev.WaitOne(); |
89 | lock (ev) | 89 | lock (ev) |
diff --git a/OpenSim/Server/Handlers/Neighbour/NeighbourHandlers.cs b/OpenSim/Server/Handlers/Neighbour/NeighbourHandlers.cs index 8a1f824..3525a01 100644 --- a/OpenSim/Server/Handlers/Neighbour/NeighbourHandlers.cs +++ b/OpenSim/Server/Handlers/Neighbour/NeighbourHandlers.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Server.Handlers.Neighbour | |||
58 | // TODO: unused: m_AuthenticationService = authentication; | 58 | // TODO: unused: m_AuthenticationService = authentication; |
59 | } | 59 | } |
60 | 60 | ||
61 | public override byte[] Handle(string path, Stream request, | 61 | protected override byte[] ProcessRequest(string path, Stream request, |
62 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 62 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
63 | { | 63 | { |
64 | // Not implemented yet | 64 | // Not implemented yet |
@@ -83,7 +83,7 @@ namespace OpenSim.Server.Handlers.Neighbour | |||
83 | // TODO: unused: m_AllowForeignGuests = foreignGuests; | 83 | // TODO: unused: m_AllowForeignGuests = foreignGuests; |
84 | } | 84 | } |
85 | 85 | ||
86 | public override byte[] Handle(string path, Stream request, | 86 | protected override byte[] ProcessRequest(string path, Stream request, |
87 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 87 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
88 | { | 88 | { |
89 | byte[] result = new byte[0]; | 89 | byte[] result = new byte[0]; |
@@ -176,7 +176,7 @@ namespace OpenSim.Server.Handlers.Neighbour | |||
176 | // TODO: unused: m_AuthenticationService = authentication; | 176 | // TODO: unused: m_AuthenticationService = authentication; |
177 | } | 177 | } |
178 | 178 | ||
179 | public override byte[] Handle(string path, Stream request, | 179 | protected override byte[] ProcessRequest(string path, Stream request, |
180 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 180 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
181 | { | 181 | { |
182 | // Not implemented yet | 182 | // Not implemented yet |
@@ -197,7 +197,7 @@ namespace OpenSim.Server.Handlers.Neighbour | |||
197 | // TODO: unused: m_AuthenticationService = authentication; | 197 | // TODO: unused: m_AuthenticationService = authentication; |
198 | } | 198 | } |
199 | 199 | ||
200 | public override byte[] Handle(string path, Stream request, | 200 | protected override byte[] ProcessRequest(string path, Stream request, |
201 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 201 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
202 | { | 202 | { |
203 | // Not implemented yet | 203 | // Not implemented yet |
diff --git a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs index 2d67c6d..abb4b19 100644 --- a/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Presence/PresenceServerPostHandler.cs | |||
@@ -56,7 +56,7 @@ namespace OpenSim.Server.Handlers.Presence | |||
56 | m_PresenceService = service; | 56 | m_PresenceService = service; |
57 | } | 57 | } |
58 | 58 | ||
59 | public override byte[] Handle(string path, Stream requestData, | 59 | protected override byte[] ProcessRequest(string path, Stream requestData, |
60 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 60 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
61 | { | 61 | { |
62 | StreamReader sr = new StreamReader(requestData); | 62 | StreamReader sr = new StreamReader(requestData); |
diff --git a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs index c62f256..964ccf8 100644 --- a/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs +++ b/OpenSim/Server/Handlers/Simulation/AgentHandlers.cs | |||
@@ -27,11 +27,13 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Specialized; | ||
30 | using System.IO; | 31 | using System.IO; |
31 | using System.IO.Compression; | 32 | using System.IO.Compression; |
32 | using System.Reflection; | 33 | using System.Reflection; |
33 | using System.Net; | 34 | using System.Net; |
34 | using System.Text; | 35 | using System.Text; |
36 | using System.Web; | ||
35 | 37 | ||
36 | using OpenSim.Server.Base; | 38 | using OpenSim.Server.Base; |
37 | using OpenSim.Server.Handlers.Base; | 39 | using OpenSim.Server.Handlers.Base; |
@@ -90,19 +92,13 @@ namespace OpenSim.Server.Handlers.Simulation | |||
90 | 92 | ||
91 | // Next, let's parse the verb | 93 | // Next, let's parse the verb |
92 | string method = (string)request["http-method"]; | 94 | string method = (string)request["http-method"]; |
93 | if (method.Equals("GET")) | 95 | if (method.Equals("DELETE")) |
94 | { | 96 | { |
95 | DoAgentGet(request, responsedata, agentID, regionID); | 97 | string auth_token = string.Empty; |
96 | return responsedata; | 98 | if (request.ContainsKey("auth")) |
97 | } | 99 | auth_token = request["auth"].ToString(); |
98 | else if (method.Equals("DELETE")) | 100 | |
99 | { | 101 | DoAgentDelete(request, responsedata, agentID, action, regionID, auth_token); |
100 | DoAgentDelete(request, responsedata, agentID, action, regionID); | ||
101 | return responsedata; | ||
102 | } | ||
103 | else if (method.Equals("DELETECHILD")) | ||
104 | { | ||
105 | DoChildAgentDelete(request, responsedata, agentID, action, regionID); | ||
106 | return responsedata; | 102 | return responsedata; |
107 | } | 103 | } |
108 | else if (method.Equals("QUERYACCESS")) | 104 | else if (method.Equals("QUERYACCESS")) |
@@ -112,7 +108,7 @@ namespace OpenSim.Server.Handlers.Simulation | |||
112 | } | 108 | } |
113 | else | 109 | else |
114 | { | 110 | { |
115 | m_log.InfoFormat("[AGENT HANDLER]: method {0} not supported in agent message", method); | 111 | m_log.ErrorFormat("[AGENT HANDLER]: method {0} not supported in agent message {1} (caller is {2})", method, (string)request["uri"], Util.GetCallerIP(request)); |
116 | responsedata["int_response_code"] = HttpStatusCode.MethodNotAllowed; | 112 | responsedata["int_response_code"] = HttpStatusCode.MethodNotAllowed; |
117 | responsedata["str_response_string"] = "Method not allowed"; | 113 | responsedata["str_response_string"] = "Method not allowed"; |
118 | 114 | ||
@@ -161,79 +157,12 @@ namespace OpenSim.Server.Handlers.Simulation | |||
161 | // Console.WriteLine("str_response_string [{0}]", responsedata["str_response_string"]); | 157 | // Console.WriteLine("str_response_string [{0}]", responsedata["str_response_string"]); |
162 | } | 158 | } |
163 | 159 | ||
164 | protected virtual void DoAgentGet(Hashtable request, Hashtable responsedata, UUID id, UUID regionID) | 160 | protected void DoAgentDelete(Hashtable request, Hashtable responsedata, UUID id, string action, UUID regionID, string auth_token) |
165 | { | ||
166 | if (m_SimulationService == null) | ||
167 | { | ||
168 | m_log.Debug("[AGENT HANDLER]: Agent GET called. Harmless but useless."); | ||
169 | responsedata["content_type"] = "application/json"; | ||
170 | responsedata["int_response_code"] = HttpStatusCode.NotImplemented; | ||
171 | responsedata["str_response_string"] = string.Empty; | ||
172 | |||
173 | return; | ||
174 | } | ||
175 | |||
176 | GridRegion destination = new GridRegion(); | ||
177 | destination.RegionID = regionID; | ||
178 | |||
179 | IAgentData agent = null; | ||
180 | bool result = m_SimulationService.RetrieveAgent(destination, id, out agent); | ||
181 | OSDMap map = null; | ||
182 | if (result) | ||
183 | { | ||
184 | if (agent != null) // just to make sure | ||
185 | { | ||
186 | map = agent.Pack(); | ||
187 | string strBuffer = ""; | ||
188 | try | ||
189 | { | ||
190 | strBuffer = OSDParser.SerializeJsonString(map); | ||
191 | } | ||
192 | catch (Exception e) | ||
193 | { | ||
194 | m_log.WarnFormat("[AGENT HANDLER]: Exception thrown on serialization of DoAgentGet: {0}", e.Message); | ||
195 | responsedata["int_response_code"] = HttpStatusCode.InternalServerError; | ||
196 | // ignore. buffer will be empty, caller should check. | ||
197 | } | ||
198 | |||
199 | responsedata["content_type"] = "application/json"; | ||
200 | responsedata["int_response_code"] = HttpStatusCode.OK; | ||
201 | responsedata["str_response_string"] = strBuffer; | ||
202 | } | ||
203 | else | ||
204 | { | ||
205 | responsedata["int_response_code"] = HttpStatusCode.InternalServerError; | ||
206 | responsedata["str_response_string"] = "Internal error"; | ||
207 | } | ||
208 | } | ||
209 | else | ||
210 | { | ||
211 | responsedata["int_response_code"] = HttpStatusCode.NotFound; | ||
212 | responsedata["str_response_string"] = "Not Found"; | ||
213 | } | ||
214 | } | ||
215 | |||
216 | protected void DoChildAgentDelete(Hashtable request, Hashtable responsedata, UUID id, string action, UUID regionID) | ||
217 | { | 161 | { |
218 | m_log.Debug(" >>> DoChildAgentDelete action:" + action + "; RegionID:" + regionID); | 162 | if (string.IsNullOrEmpty(action)) |
219 | 163 | m_log.DebugFormat("[AGENT HANDLER]: >>> DELETE <<< RegionID: {0}; from: {1}; auth_code: {2}", regionID, Util.GetCallerIP(request), auth_token); | |
220 | GridRegion destination = new GridRegion(); | ||
221 | destination.RegionID = regionID; | ||
222 | |||
223 | if (action.Equals("release")) | ||
224 | ReleaseAgent(regionID, id); | ||
225 | else | 164 | else |
226 | m_SimulationService.CloseChildAgent(destination, id); | 165 | m_log.DebugFormat("[AGENT HANDLER]: Release {0} to RegionID: {1}", id, regionID); |
227 | |||
228 | responsedata["int_response_code"] = HttpStatusCode.OK; | ||
229 | responsedata["str_response_string"] = "OpenSim agent " + id.ToString(); | ||
230 | |||
231 | m_log.Debug("[AGENT HANDLER]: Child Agent Released/Deleted."); | ||
232 | } | ||
233 | |||
234 | protected void DoAgentDelete(Hashtable request, Hashtable responsedata, UUID id, string action, UUID regionID) | ||
235 | { | ||
236 | m_log.Debug(" >>> DoDelete action:" + action + "; RegionID:" + regionID); | ||
237 | 166 | ||
238 | GridRegion destination = new GridRegion(); | 167 | GridRegion destination = new GridRegion(); |
239 | destination.RegionID = regionID; | 168 | destination.RegionID = regionID; |
@@ -241,12 +170,12 @@ namespace OpenSim.Server.Handlers.Simulation | |||
241 | if (action.Equals("release")) | 170 | if (action.Equals("release")) |
242 | ReleaseAgent(regionID, id); | 171 | ReleaseAgent(regionID, id); |
243 | else | 172 | else |
244 | Util.FireAndForget(delegate { m_SimulationService.CloseAgent(destination, id); }); | 173 | Util.FireAndForget(delegate { m_SimulationService.CloseAgent(destination, id, auth_token); }); |
245 | 174 | ||
246 | responsedata["int_response_code"] = HttpStatusCode.OK; | 175 | responsedata["int_response_code"] = HttpStatusCode.OK; |
247 | responsedata["str_response_string"] = "OpenSim agent " + id.ToString(); | 176 | responsedata["str_response_string"] = "OpenSim agent " + id.ToString(); |
248 | 177 | ||
249 | m_log.DebugFormat("[AGENT HANDLER]: Agent {0} Released/Deleted from region {1}", id, regionID); | 178 | //m_log.DebugFormat("[AGENT HANDLER]: Agent {0} Released/Deleted from region {1}", id, regionID); |
250 | } | 179 | } |
251 | 180 | ||
252 | protected virtual void ReleaseAgent(UUID regionID, UUID id) | 181 | protected virtual void ReleaseAgent(UUID regionID, UUID id) |
@@ -274,7 +203,7 @@ namespace OpenSim.Server.Handlers.Simulation | |||
274 | m_SimulationService = null; | 203 | m_SimulationService = null; |
275 | } | 204 | } |
276 | 205 | ||
277 | public override byte[] Handle(string path, Stream request, | 206 | protected override byte[] ProcessRequest(string path, Stream request, |
278 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 207 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
279 | { | 208 | { |
280 | // m_log.DebugFormat("[SIMULATION]: Stream handler called"); | 209 | // m_log.DebugFormat("[SIMULATION]: Stream handler called"); |
@@ -488,7 +417,7 @@ namespace OpenSim.Server.Handlers.Simulation | |||
488 | m_SimulationService = null; | 417 | m_SimulationService = null; |
489 | } | 418 | } |
490 | 419 | ||
491 | public override byte[] Handle(string path, Stream request, | 420 | protected override byte[] ProcessRequest(string path, Stream request, |
492 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 421 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
493 | { | 422 | { |
494 | // m_log.DebugFormat("[SIMULATION]: Stream handler called"); | 423 | // m_log.DebugFormat("[SIMULATION]: Stream handler called"); |
diff --git a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs index 72551ef..24c9de6 100644 --- a/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs +++ b/OpenSim/Server/Handlers/UserAccounts/UserAccountServerPostHandler.cs | |||
@@ -68,7 +68,7 @@ namespace OpenSim.Server.Handlers.UserAccounts | |||
68 | } | 68 | } |
69 | } | 69 | } |
70 | 70 | ||
71 | public override byte[] Handle(string path, Stream requestData, | 71 | protected override byte[] ProcessRequest(string path, Stream requestData, |
72 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 72 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
73 | { | 73 | { |
74 | StreamReader sr = new StreamReader(requestData); | 74 | StreamReader sr = new StreamReader(requestData); |