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

An HTTP2 DataFrame with pad_length=0 returns no payload #669

Open
mattfysh opened this issue Oct 1, 2024 · 0 comments
Open

An HTTP2 DataFrame with pad_length=0 returns no payload #669

mattfysh opened this issue Oct 1, 2024 · 0 comments

Comments

@mattfysh
Copy link

mattfysh commented Oct 1, 2024

Describe the bug
An HTTP2 DataFrame with pad_length=0 returns no payload

To Reproduce
When unpacking a PaddedFrame with HTTP2_FLAG_PADDED, zero is a valid pad_length, however the calculation of the payload occurs using:

self.unpadded_data = self.data[1:-self.pad_length]

if pad_length is zero, this wipes out the frame's data

Expected behavior

self.unpadded_data = self.data[1:] if self.pad_length == 0 else self.data[1:-self.pad_length]

Details(please complete the following information):

  • OS: MacOS
  • Python Version 3.21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant