exceptionfactory commented on code in PR #11963:
URL: https://github.com/apache/nifi/pull/11963#discussion_r4687609172
##########
nifi-commons/nifi-hashicorp-vault/src/main/java/org/apache/nifi/vault/hashicorp/StandardHashiCorpVaultCommunicationService.java:
##########
@@ -105,11 +103,12 @@ public StandardHashiCorpVaultCommunicationService(final
PropertySource<?>... pro
}
final VaultEndpoint vaultEndpoint = vaultConfiguration.vaultEndpoint();
- final RestTemplate restTemplate =
VaultClients.createRestTemplate(vaultEndpoint, clientHttpRequestFactory);
vaultConfiguration.setClientHttpRequestFactory(clientHttpRequestFactory);
- final VaultClient.Builder vaultClientBuilder =
VaultClient.builder(restTemplate).endpoint(vaultEndpoint);
+ final VaultClient.Builder vaultClientBuilder = VaultClient.builder()
+ .endpoint(vaultEndpoint)
+ .requestFactory(clientHttpRequestFactory);
Review Comment:
It looks like this approach avoids buffering the request body, so the
`Content-Length` header may not be sent. Creating a `RestClient` and passing it
in looks like one option
--
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]