http: fix charset detection of extract_content_type()