Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim-Brooks committed Sep 11, 2024
1 parent b0e95ba commit b243a85
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ public HttpRequest releaseAndCopy() {
}
try {
final ByteBuf copiedContent = Unpooled.copiedBuffer(request.content());
HttpBody newContent;
if (content.isStream()) {
newContent = content;
} else {
newContent = Netty4Utils.fullHttpBodyFrom(copiedContent);
}
return new Netty4HttpRequest(
sequence,
new DefaultFullHttpRequest(
Expand All @@ -139,7 +145,7 @@ public HttpRequest releaseAndCopy() {
),
new AtomicBoolean(false),
false,
content
newContent
);
} finally {
release();
Expand Down

0 comments on commit b243a85

Please sign in to comment.