Avoid writing padding bytes if no content is inflated#31
Merged
LloydW93 merged 1 commit intocloudflare:gcc.amd64from Sep 22, 2022
Merged
Conversation
Port the change for Chromium issue 1302606 which avoids writing padding bytes for debug purposes except for debug builds. In particular, this ensures that the JDK `InflaterInputStream::read(byte[] b, int off, int len)` contract can be satisfied by this implementation. See: - https://bugs.chromium.org/p/chromium/issues/detail?id=1302606 - https://chromium.googlesource.com/chromium/src/+/36be3c7a465f00f4edefccc10bba00bbebe1843d%5E%21/ This is complementary to the work Volker Simonis is doing upstream on making `InflaterInputStream` more tolerant of this kind of behavior, providing compatibility for earlier JDK releases. - https://bugs.openjdk.org/browse/JDK-8281962 - https://bugs.openjdk.org/browse/JDK-8283758 Signed-off-by: Danny Thomas <dannyt@netflix.com>
simonis
approved these changes
Sep 2, 2022
simonis
left a comment
There was a problem hiding this comment.
This looks good to me.
Thanks for the downport.
LloydW93
approved these changes
Sep 22, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port the change for Chromium issue 1302606 which avoids writing padding bytes for debug purposes except for debug builds. In particular, this ensures that the JDK
InflaterInputStream::read(byte[] b, int off, int len)contract can be satisfied by this implementation. See:This is complementary to the work Volker Simonis is doing upstream on making
InflaterInputStreammore tolerant of this kind of behavior, providing compatibility for earlier JDK releases.