Skip to content

Conversation

david-crespo
Copy link
Contributor

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.

/// response.extensions_mut().insert(NoCompression);
/// ```
#[derive(Debug, Clone, Copy)]
pub struct NoCompression;
Copy link
Contributor Author

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" ]

Copy link
Contributor Author

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() {
Copy link
Contributor Author

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.

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

Successfully merging this pull request may close these issues.

Gzip response bodies
1 participant