private bool IsTextContentType(string contentType)
{
string[] parts = contentType.Split(';');
if(parts.Length <= 0)
return false;
switch(parts[0].ToLower())
{
case "text/html": return true;
case "application/x-javascript": return true;
default: break;
}
return false;
}