fixed parsing of content-type headers