Browse Source

Revert workaround in Jetty connector

The workaround was removed in the 5.3 milestone phase and in master
only because the referenced Jetty issue is marked fixed. However,
what we need to replace it with should be a little more involved
and also it's not entirely clear if the fixes in Jetty aligns with
our release and retain semantics so that needs to be investigated
more thoroughly.
pull/25876/head
Rossen Stoyanchev 4 years ago
parent
commit
1c5b95db0b
  1. 11
      spring-web/src/main/java/org/springframework/http/client/reactive/JettyClientHttpConnector.java

11
spring-web/src/main/java/org/springframework/http/client/reactive/JettyClientHttpConnector.java

@ -131,7 +131,16 @@ public class JettyClientHttpConnector implements ClientHttpConnector { @@ -131,7 +131,16 @@ public class JettyClientHttpConnector implements ClientHttpConnector {
}
private DataBuffer toDataBuffer(ContentChunk chunk) {
DataBuffer buffer = this.bufferFactory.wrap(chunk.buffer);
// Originally we copy due to do:
// https://github.com/eclipse/jetty.project/issues/2429
// Now that the issue is marked fixed we need to replace the below with a
// PooledDataBuffer that adapts "release()" to "succeeded()", and also
// evaluate if the concern here is addressed.
DataBuffer buffer = this.bufferFactory.allocateBuffer(chunk.buffer.capacity());
buffer.write(chunk.buffer);
chunk.callback.succeeded();
return buffer;
}

Loading…
Cancel
Save