From 550018f02dbe9d725ff9cdd69f3cf17fac727220 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 13 May 2008 13:36:21 +0000 Subject: * As part of the region registration process, the grid service now requests the status of the region using the region http uri just passed in * If the status cannot be retrieved, then the region startup will terminate. * The aim of this is for earlier detection of situations where the region can send messages out but cannot accept incoming requests (often due to firewall issues) * This is currently an extremely simplistic check which completely trusts whatever http uri is given by the region * This contact may be problematic, though since the user service needs to be able to contact the region http uri, it doesn't seem unreasonable for the grid to have to be able to do so too at this stage * This change will require a prebuild --- OpenSim/Framework/Communications/RestClient.cs | 18 +++++++++--------- OpenSim/Framework/Servers/BaseHttpServer.cs | 5 ++++- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs index d0ac833..4ed62bf 100644 --- a/OpenSim/Framework/Communications/RestClient.cs +++ b/OpenSim/Framework/Communications/RestClient.cs @@ -15,17 +15,17 @@ namespace OpenSim.Framework.Communications /// /// /// This class is a generic implementation of a REST (Representational State Transfer) web service. This - /// class is designed to execute both synchroneously and asynchroneously. + /// class is designed to execute both synchronously and asynchronously. /// - /// Internally the implementation works as a two stage asynchroneous web-client. - /// When the request is initiated, RestClient will query asynchroneously for for a web-response, + /// Internally the implementation works as a two stage asynchronous web-client. + /// When the request is initiated, RestClient will query asynchronously for for a web-response, /// sleeping until the initial response is returned by the server. Once the initial response is retrieved - /// the second stage of asynchroneous requests will be triggered, in an attempt to read of the response - /// object into a memorystream as a sequence of asynchroneous reads. + /// the second stage of asynchronous requests will be triggered, in an attempt to read of the response + /// object into a memorystream as a sequence of asynchronous reads. /// /// The asynchronisity of RestClient is designed to move as much processing into the back-ground, allowing - /// other threads to execute, while it waits for a response from the web-service. RestClient it self, can be - /// invoked by the caller in either synchroneous mode or asynchroneous mode. + /// other threads to execute, while it waits for a response from the web-service. RestClient itself can be + /// invoked by the caller in either synchronous mode or asynchronous modes. /// public class RestClient { @@ -245,7 +245,7 @@ namespace OpenSim.Framework.Communications #endregion Async communications with server /// - /// Perform synchroneous request + /// Perform a synchronous request /// public Stream Request() { @@ -365,4 +365,4 @@ namespace OpenSim.Framework.Communications #endregion Async Invocation } -} \ No newline at end of file +} diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index e198c2c..2f495a9 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs @@ -144,6 +144,8 @@ namespace OpenSim.Framework.Servers string path = request.RawUrl; string handlerKey = GetHandlerKey(request.HttpMethod, path); + + //m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path); IRequestHandler requestHandler; @@ -154,6 +156,7 @@ namespace OpenSim.Framework.Servers if (requestHandler is IStreamedRequestHandler) { IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler; + buffer = streamedRequestHandler.Handle(path, request.InputStream); } else @@ -179,7 +182,7 @@ namespace OpenSim.Framework.Servers } catch (HttpListenerException) { - m_log.InfoFormat("[BASE HTTP SERVER] Http request abnormally terminated."); + m_log.WarnFormat("[BASE HTTP SERVER]: HTTP request abnormally terminated."); } } else -- cgit v1.1