C# Class HttpServer.Modules.FileModule

Serves files in the web server.
Inheritance: IModule
显示文件 Open project: NyxStudios/HttpServer Class Usage Examples

Public Methods

Method Description
AddDefaultMimeTypes ( ) : void

Mime types that this class can handle per default

Contains the following mime types:

FileModule ( ) : System

Initializes a new instance of the FileModule class.

Process ( RequestContext context ) : ProcessingResult

Process a request.

Private Methods

Method Description
SendFile ( IHttpContext context, IResponse response, Stream stream ) : void

Will send a file to client.

Method Details

AddDefaultMimeTypes() public method

Mime types that this class can handle per default
Contains the following mime types:
public AddDefaultMimeTypes ( ) : void
return void

FileModule() public method

Initializes a new instance of the FileModule class.
baseUri or basePath is null.
public FileModule ( ) : System
return System

Process() public method

Process a request.
Failed to find file extension Forbidden file type.
public Process ( RequestContext context ) : ProcessingResult
context RequestContext Request information
return ProcessingResult