fix when content-type header contains encoding

e.g. application/x-www-form-urlencoded; charset=utf-8

Did a string comparison on the string before the first ;