-
Notifications
You must be signed in to change notification settings - Fork 88
Gzip response bodies #1448
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
base: main
Are you sure you want to change the base?
Gzip response bodies #1448
Conversation
/// response.extensions_mut().insert(NoCompression); | ||
/// ``` | ||
#[derive(Debug, Clone, Copy)] | ||
pub struct NoCompression; |
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.
This seems like a way for a dropshot handler to tell dropshot not to compress the response even though it might otherwise compress it. That's neat, but happy to get rid of it if we don't need it.
[dependencies.tokio-util] | ||
version = "0.7" | ||
features = [ "io", "compat" ] | ||
|
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.
Used for converting between AsyncRead
/AsyncWrite
from async-compression and the streams used by Body
from hyper.
} | ||
|
||
#[tokio::test] | ||
async fn test_gzip_compression_with_accept_encoding() { |
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.
This is the primary happy path test for compression.
Closes #221
Needed a break so I kinda went to town here -- many rounds of review and iteration with both Claude Code and Codex. It's long as hell but it's almost all tests. Leaving as a draft for now because I want to go through it in more detail and write up a better description, but it seems pretty legit.