BlogEngine.Core.Web.HttpHandlers.FileHandler.SetContentType C# (CSharp) Method

SetContentType() private static method

Sets the content type depending on the filename's extension.
private static SetContentType ( HttpContext context, string fileName ) : void
context System.Web.HttpContext /// The context. ///
fileName string /// The file Name. ///
return void
        private static void SetContentType(HttpContext context, string fileName)
        {
            context.Response.AddHeader(
                "Content-Type", fileName.EndsWith(".pdf") ? "application/pdf" : "application/octet-stream");
        }