BlogEngine.Core.Web.HttpModules.CompressionModule.IsEncodingAccepted C# (CSharp) Method

IsEncodingAccepted() private static method

Checks the request headers to see if the specified encoding is accepted by the client.
private static IsEncodingAccepted ( string encoding ) : bool
encoding string /// The encoding. ///
return bool
        private static bool IsEncodingAccepted(string encoding)
        {
            var context = HttpContext.Current;
            return context.Request.Headers["Accept-encoding"] != null &&
                   context.Request.Headers["Accept-encoding"].Contains(encoding);
        }