src/Foundation/Net/Gimela.Net.Http/Modules/FileModule.cs
/// <summary>
/// Will send a file to client.
/// </summary>
/// <param name="context">HTTP context containing outbound stream.</param>
/// <param name="response">Response containing headers.</param>
/// <param name="stream">File stream</param>
Will send a file to client.
Will send a file to client .
private void SendFile(IHttpContext context, IResponse response, Stream stream)
    {
      response.ContentLength.Value = stream.Length;
      var generator = HttpFactory.Current.Get<ResponseWriter>();
      generator.SendHeaders(context, response);
      generator.SendBody(context, stream);
    }
private void SendFile ( IHttpContext context , IResponse response , Stream stream ) { response . ContentLength . Value = stream . Length ; var generator = HttpFactory . Current . Get < ResponseWriter > ( ) ; generator . SendHeaders ( context , response ) ; generator . SendBody ( context , stream ) ; }
Will send a file to client.
Will send a file to client .
context
IHttpContext
HTTP context containing outbound stream.
HTTP context containing outbound stream .
response
IResponse
Response containing headers.
Response containing headers .
stream
Stream
None