-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix retrying requests with body contents by resetting the reader index of ByteBuf #1281
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -178,6 +178,13 @@ public Iterable<HttpContent> getBodyContents() { | |
return Collections.unmodifiableList(bodyChunks); | ||
} | ||
|
||
@Override | ||
public void resetBodyReader() { | ||
for (final HttpContent chunk : bodyChunks) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it worth only resetting this when we know we have a body, i.e. effectively There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking at the soft contract we don't set the |
||
chunk.content().resetReaderIndex(); | ||
} | ||
} | ||
|
||
@Override | ||
public boolean finishBufferedBodyIfIncomplete() { | ||
if (! bodyBufferedCompletely) { | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth clarifying in this comment that we want Netty to have access to that ByteBuf, rather than Zuul itself.