isMimeType :: String -> Bool
isMimeType s =
    case split (=='/') s of
      [mtype,msubtype] ->
          ((map toLower mtype) `elem` types
           || "x-" `isPrefixOf` (map toLower mtype))
          && all valid mtype
          && all valid msubtype
      _ -> False
 where
   types =  ["text","image","audio","video","application","message","multipart"]
   valid c = isAscii c && not (isControl c) && not (isSpace c) &&
             c `notElem` "()<>@,;:\\\"/[]?="

-- | Fetch URL, return its Content-Type and binary data on success.
isMimeType :: String -> Bool
isMimeType s =
    case split (=='/') s of
      [mtype,msubtype] ->
          ((map toLower mtype) `elem` types
           || "x-" `isPrefixOf` (map toLower mtype))
          && all valid mtype
          && all valid msubtype
      _ -> False
 where
   types =  ["text","image","audio","video","application","message","multipart"]
   valid c = isAscii c && not (isControl c) && not (isSpace c) &&
             c `notElem` "()<>@,;:\\\"/[]?="

-- | Fetch URL, return its Content-Type and binary data on success.
isMimeType s =
    case split (=='/') s of
      [mtype,msubtype] ->
          ((map toLower mtype) `elem` types
           || "x-" `isPrefixOf` (map toLower mtype))
          && all valid mtype
          && all valid msubtype
      _ -> False
 where
   types =  ["text","image","audio","video","application","message","multipart"]
   valid c = isAscii c && not (isControl c) && not (isSpace c) &&
             c `notElem` "()<>@,;:\\\"/[]?="

-- | Fetch URL, return its Content-Type and binary data on success.