-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Labels
A-webproject: actix-webproject: actix-webC-improvementCategory: an improvement to existing functionalityCategory: an improvement to existing functionalitygood-first-issueeasy to pick up for newcomerseasy to pick up for newcomers
Description
Expected Behavior
Most image/* mime types such as png and jpeg are already pre-compressed, so when using .wrap(middleware::Compress::default()), the expectation is that the well known images would not be compressed.
Current Behavior
Currently the compression middleware only looks at the content-encoding of the response (which should not be set for images), and thus compresses images again.
Possible Solution
- Check against a list of well known image types
- Offer a way to set a callback so that the user can check themselves
- all of the above?
Your Environment
- Rust Version: 1.67.1
- Actix Web Version: 4.3.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-webproject: actix-webproject: actix-webC-improvementCategory: an improvement to existing functionalityCategory: an improvement to existing functionalitygood-first-issueeasy to pick up for newcomerseasy to pick up for newcomers