Bloom.Api.ServerBase.ProcessRequest C# (CSharp) Method

ProcessRequest() protected method

This method is overridden in classes inheriting from this class to handle specific request types
protected ProcessRequest ( IRequestInfo info ) : bool
info IRequestInfo
return bool
        protected virtual bool ProcessRequest(IRequestInfo info)
        {
            #if MEMORYCHECK
            // Check memory for the benefit of developers.  (Also see all requests as a side benefit.)
            var debugMsg = String.Format("ServerBase.ProcessRequest(\"{0}\"", info.RawUrl);
            SIL.Windows.Forms.Reporting.MemoryManagement.CheckMemory(true, debugMsg, false);
            #endif
            // process request for directory index
            var requestedPath = GetLocalPathWithoutQuery(info);
            if (info.RawUrl.EndsWith("/") && (Directory.Exists(requestedPath)))
            {
                info.WriteError(403, "Directory listing denied");
                return true;
            }

            if (requestedPath.EndsWith("testconnection"))
            {
                info.WriteCompleteOutput("OK");
                return true;
            }
            return false;
        }