Joaquim Pedro Silveira opened SPR-14744 and commented
As title describes, when trying to use AsyncRestTemplate with a Netty4ClientHttpRequestFactory, the client is not properly configured by default for https servers.
I also tried with the following code, which results in an HttpClientErrorException:
@Test
public void asyncRestNetty() throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
AsyncRestTemplate restTemplate = new AsyncRestTemplate(new Netty4ClientHttpRequestFactory());
// the client should send a request to an HTTPS server
ListenableFuture<ResponseEntity<String>> listenableFuture = restTemplate.getForEntity("https://example.org/some/resource", String.class);
listenableFuture.addCallback((result) -> {
latch.countDown();
assertThat(result, is(notNullValue()));
assertThat(result.getBody(), is(not(isEmptyOrNullString())));
}, (throwable) -> {
latch.countDown();
fail(throwable.getMessage());
});
if (!latch.await(30, TimeUnit.SECONDS)) {
fail("Timeout");
}
}
Affects: 4.3.3
Reference URL: http://stackoverflow.com/questions/39639467/spring-resttemplate-asyncresttemplate-with-netty4-hangs-forever
Issue Links:
Joaquim Pedro Silveira opened SPR-14744 and commented
As title describes, when trying to use AsyncRestTemplate with a Netty4ClientHttpRequestFactory, the client is not properly configured by default for https servers.
I also tried with the following code, which results in an
HttpClientErrorException:Affects: 4.3.3
Reference URL: http://stackoverflow.com/questions/39639467/spring-resttemplate-asyncresttemplate-with-netty4-hangs-forever
Issue Links: