src/HttpServer/HttpServer.cs
/// <summary>
/// Resolve and return the HTTP handler for the HTTP context of request/response
/// </summary>
/// <param name="httpContext">HTTP context of request/response</param>
/// <returns>HTTP handler for processing the request</returns>
Resolve and return the HTTP handler for the HTTP context of request/response
Resolve and return the HTTP handler for the HTTP context of request / response
private IHttpHandler ResolveHandler(HttpContext httpContext)
        {
            HttpHandlerBase handler = null;
            if (this.fileSystemHandler.CanProcessRequest(httpContext))
            {
                return this.fileSystemHandler;
            }
            else
            {
                if (this.handlers.ContainsKey(httpContext.Request.URL))
                {
                    return (IHttpHandler)this.handlers[httpContext.Request.URL];
                }
            }
            return handler;
        }
private IHttpHandler ResolveHandler ( HttpContext httpContext ) { HttpHandlerBase handler = null ; if ( this . fileSystemHandler . CanProcessRequest ( httpContext ) ) { return this . fileSystemHandler ; } else { if ( this . handlers . ContainsKey ( httpContext . Request . URL ) ) { return ( IHttpHandler ) this . handlers [ httpContext . Request . URL ] ; } } return handler ; }
Resolve and return the HTTP handler for the HTTP context of request/response
Resolve and return the HTTP handler for the HTTP context of request / response
// check if it is a request for the file system // check URL for handler
HTTP handler for processing the request
HTTP handler for processing the request
httpContext
HttpContext
HTTP context of request/response
HTTP context of request / response