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

HTTP2ToHTTP1Codec: Fix receiving empty .body before .end #295

Merged
merged 1 commit into from
Aug 12, 2021

Conversation

fabianfett
Copy link
Member

Motivation

Currently if a peer sends an empty dataPayload that signals the stream's end, the HTTP2ToHTTP1Codec will issue a HTTP1 .body with an empty ByteBuffer and an HTTP1 .end. The HTTP1 .body with the empty byte buffer can be saved.

Changes

The BaseClientCodec was changed in such a way, that an empty dataPayload that signals the stream's end, will only create a HTTP1 .end.

Result

Fewer empty byteBuffers.

@fabianfett fabianfett requested review from Lukasa and glbrntt August 12, 2021 08:44
@fabianfett fabianfett force-pushed the ff-fix-empty-byte-buffer-before-end branch from a033b94 to 65e241c Compare August 12, 2021 08:50
@glbrntt glbrntt added the 🔨 semver/patch No public API change. label Aug 12, 2021
@Lukasa Lukasa merged commit 1f64743 into apple:main Aug 12, 2021
@fabianfett fabianfett deleted the ff-fix-empty-byte-buffer-before-end branch August 12, 2021 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants