private static string MapMIMEType(string filePath, string type)
{
switch (GetFileExtentsion(filePath)) {
case "css":
type = "text/css";
break;
case "xml":
case "xsl":
type = "text/xml";
break;
case "jpg":
case "jpeg":
type = "image/jpeg";
break;
case "gif":
type = "image/gif";
break;
// Not exhaustive. Extend this list as required.
}
return type;
}