Added unit tests for the Content-Type parser and fixed bugs