fix HEAD check, support more JS content-types