Ejemplo n.º 1
0
 public void Detect()
 {
     if (context.Request.Headers.ContentType.HasValue)
     {
         HeaderHelpers.GetContentMediaTypeAndCharset(context.Request.Headers.ContentType.Value, out mediaType,
                                                     out charsetEncoding);
     }
     if (mediaType == null)
     {
         mediaType = MediaType.None;
     }
     if (charsetEncoding == null)
     {
         charsetEncoding = Encoding.UTF8;
     }
     isHeaderRead = true;
 }