be safe and only attempt to encode as utf-8 when User-Agent header is present in the request.