fix for correctly detecting content-type header.