Skip to content
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

okhttp: okhttp client and server transport should use padded length for flow control #10422

Merged
merged 7 commits into from Aug 16, 2023

Conversation

YifeiZhuang
Copy link
Contributor

fix #10018

@YifeiZhuang YifeiZhuang requested a review from ejona86 July 26, 2023 23:56
@YifeiZhuang YifeiZhuang changed the title okhttp: okhttp client transport should use padded length for flow control okhttp: okhttp client and server transport should use padded length for flow control Aug 10, 2023
return createMessageFrame(stringMessage, 0);
}

private static Buffer createMessageFrame(String stringMessage, int paddingLength) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the point of this new method, and it is a bit misleading. This seems to only work because nothing consumes the padding. When outside of the test, the buffer would have paddingLength-1 extra data, because 1 byte was consumed to communicate the padding length.

It seems this could just be removed and use the old non-padding-enabled creation.

@YifeiZhuang YifeiZhuang merged commit 5f34c60 into grpc:master Aug 16, 2023
14 checks passed
@YifeiZhuang YifeiZhuang deleted the fix-okhttp-pad-len branch August 16, 2023 22:12
larry-safran pushed a commit to larry-safran/grpc-java that referenced this pull request Aug 29, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

okhttp: Padding not taken into account for flow control
2 participants