Skip to content

Commit b270bf1

Browse files
committed
Update to explicit unbound http content decompressor, retain existing behavior of no arg constructor now that the no arg constructor is deprecated
Signed-off-by: Andre Kurait <[email protected]>
1 parent b5b9c3c commit b270bf1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

TrafficCapture/trafficReplayer/src/main/java/org/opensearch/migrations/replay/HttpByteBufFormatter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ public static <T> T processHttpMessageFromBufs(HttpMessageType msgType,
250250
ChannelHandler... handlers) {
251251
EmbeddedChannel channel = new EmbeddedChannel(
252252
msgType == HttpMessageType.REQUEST ? new HttpRequestDecoder() : new HttpResponseDecoder(),
253-
new HttpContentDecompressor()
253+
new HttpContentDecompressor(0)
254254
);
255255
for (var h : handlers) {
256256
channel.pipeline().addLast(h);

TrafficCapture/trafficReplayer/src/main/java/org/opensearch/migrations/replay/datahandlers/http/RequestPipelineOrchestrator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ void addContentParsingHandlers(
146146
pipeline.addLast(new ReadMeteringHandler(httpTransactionContext::onPayloadBytesIn));
147147
// IN: Netty HttpRequest(1) + HttpJsonRequest(1) with headers + HttpContent(1) blocks (which may be compressed)
148148
// OUT: Netty HttpRequest(2) + HttpJsonRequest(1) with headers + HttpContent(2) uncompressed blocks
149-
pipeline.addLast(new HttpContentDecompressor());
149+
pipeline.addLast(new HttpContentDecompressor(0));
150150
pipeline.addLast(new ReadMeteringHandler(httpTransactionContext::onUncompressedBytesIn));
151151
if (transformer != null) {
152152
httpTransactionContext.onJsonPayloadParseRequired();

TrafficCapture/trafficReplayer/src/testFixtures/java/org/opensearch/migrations/replay/TestUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public static void verifyCapturedResponseMatchesExpectedPayload(
117117
AtomicReference<FullHttpRequest> fullHttpRequestAtomicReference = new AtomicReference<>();
118118
EmbeddedChannel unpackVerifier = new EmbeddedChannel(
119119
new HttpRequestDecoder(),
120-
new HttpContentDecompressor(),
120+
new HttpContentDecompressor(0),
121121
new HttpObjectAggregator(bytesCaptured.length * 2),
122122
new SimpleChannelInboundHandler<FullHttpRequest>() {
123123
@Override

0 commit comments

Comments
 (0)