-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(replays): Add handling for uncompressed payload types #1793
Conversation
I'd like to put this one on hold until we've made progress on the memory issue. That said, instead of ignoring compression errors, please match on the magic bytes of the compression header. If you're reading a broken gzip compressed payload, you wanna know that there was an error decompressing it. Only if the payload is not compressed, you should pipe it through. |
// deserialize the body bytes as is. | ||
match decompress(body, limit) { | ||
Ok(buf) => Ok((headers, buf)), | ||
Err(_) => Ok((headers, body.into())), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignoring errors here can and will lead to other errors downstream. Instead, please check if the body is compressed by inspecting magic bytes, and run decompression conditionally.
This has been incorporated into #1800. I'll be following up with some more module separation, for now we can close this. Thank you for the nudge! |
Couple of things happening here: