implement RFC2616 compatible mime type matching algorithm.