exceptionfactory commented on a change in pull request #5378:
URL: https://github.com/apache/nifi/pull/5378#discussion_r804993252
##########
File path:
nifi-nar-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/RestLookupService.java
##########
@@ -333,7 +335,8 @@ private void setProxy(OkHttpClient.Builder builder) {
final Record record;
try (final InputStream is = responseBody.byteStream();
final InputStream bufferedIn = new BufferedInputStream(is)) {
- record = handleResponse(bufferedIn,
responseBody.contentLength(), context);
+ String toString = IOUtils.toString(bufferedIn,
StandardCharsets.UTF_8);
+ record = handleResponse(new
ByteArrayInputStream(toString.getBytes(StandardCharsets.UTF_8)),
responseBody.contentLength(), context);
Review comment:
Although this may only be reading one Record, the `UTF-8` encoding is
also a concern, versus just passing the InputStream directly to the Record
Reader.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]