content-type header can contain encoding, e.g. application/x-www-form-urlencoded; charset=utf-8

Did a string comparison on the string before the first ;.
content-type fix with strncasecmp
Merge pull request #10 from lievenjanssen/content-type-fix

fix when content-type header contains encoding