-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add checksum listeners before response targets #3250
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
Conversation
Detected 1 possible performance regressions:
|
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.
Nice, looks fine. I added some minor alignment suggestions so that it's easier to resolve it here.
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.
Nice - approach makes sense.
Co-authored-by: Juli Tera <57973151+jterapin@users.noreply.github.com>
Fixes #3244
This approach simply emits the chunk data prior to writing it out to the body. When emitting, the chunk may be modified, then that modified chunk may be written to the body. Checksum verification relies on on_data to verify chunks of data. Checksum verification fails when the chunk is mutated.
Initially tried a different approach of moving moving checksum response listeners to be very early in the stack (listeners are executed in the order that they are registered) and changing the listeners to use on_data instead of on_headers, but this had issues because on_data would re-register bodies each time and had issues with client encryption.