private static void addHeaders(string fileName, long fileLength, object response, FlushType flushType)
{
var addHeader = response.GetType().GetMethod("AddHeader");
addHeader.Invoke(response, new object[] { "Content-Length", fileLength.ToString(CultureInfo.InvariantCulture) });
var contentDisposition = flushType == FlushType.Inline ? "inline;filename=" : "attachment;filename=";
addHeader.Invoke(response, new object[] { "content-disposition", contentDisposition + fileName });
}