Complete the 'parse a MIME type' algorithm.