Skip to content

Conversation

Cyan4973
Copy link
Contributor

@Cyan4973 Cyan4973 commented Jun 22, 2022

Streaming decompression used to wait for a minimum of 5 bytes before attempting decoding.
This meant that, in the case that only a few bytes (<5) were provided,
and assuming these bytes are incorrect,
there would be no error reported.
The streaming API would simply request more data, waiting for at least 5 bytes.

This PR makes it possible to detect incorrect Frame IDs as soon as the first byte is provided.

Fix #3169 for urllib3 use case

@Cyan4973 Cyan4973 force-pushed the fix3169 branch 2 times, most recently from 2264e90 to 53aadc7 Compare June 22, 2022 03:00
Streaming decompression used to wait for a minimum of 5 bytes before attempting decoding.
This meant that, in the case that only a few bytes (<5) were provided,
and assuming these bytes are incorrect,
there would be no error reported.
The streaming API would simply request more data, waiting for at least 5 bytes.

This PR makes it possible to detect incorrect Frame IDs as soon as the first byte is provided.

Fix #3169
@Cyan4973 Cyan4973 merged commit f5c4ec4 into dev Jun 22, 2022
@Cyan4973 Cyan4973 deleted the fix3169 branch January 13, 2023 04:28
@Cyan4973 Cyan4973 mentioned this pull request Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stream decompression: check 1~4 bytes Magic Number
3 participants