Fixed content-type related code.
HTTP server may return non-utf8 charset!