properly support global transport compression with new bytes transport request optimization
This commit is contained in:
parent
0f4d81fcd4
commit
0469cca4be
|
@ -542,7 +542,9 @@ public class NettyTransport extends AbstractLifecycleComponent<Transport> implem
|
||||||
BytesStreamOutput bStream = new BytesStreamOutput();
|
BytesStreamOutput bStream = new BytesStreamOutput();
|
||||||
bStream.skip(NettyHeader.HEADER_SIZE);
|
bStream.skip(NettyHeader.HEADER_SIZE);
|
||||||
StreamOutput stream = bStream;
|
StreamOutput stream = bStream;
|
||||||
if (options.compress()) {
|
// only compress if asked, and, the request is not bytes, since then only
|
||||||
|
// the header part is compressed, and the "body" can't be extracted as compressed
|
||||||
|
if (options.compress() && (!(request instanceof BytesTransportRequest))) {
|
||||||
status = TransportStatus.setCompress(status);
|
status = TransportStatus.setCompress(status);
|
||||||
stream = CompressorFactory.defaultCompressor().streamOutput(stream);
|
stream = CompressorFactory.defaultCompressor().streamOutput(stream);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue