Skip to content
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

Brotli as an optional dependency for Gzip #186

Merged
merged 1 commit into from
Jan 31, 2019

Conversation

PChambino
Copy link
Contributor

Issue: #185

The current implementation doesn't really make brotli optional and the middleware will fail if it is missing and the server replies with brotli encoding.

This PR should make it optional but with the current specs it is a bit difficult to test it.

optional_dependency could be moved to Faraday::Middleware if it makes sense later.

This is just a possible solution. :)

Copy link
Member

@iMacTia iMacTia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good point, I see what the problem is!
Thanks a lot for contributing 👍

To be honest this middleware started as a gzip decompressor but is getting more and more generic supporting other decompressors.
It would benefit from some refactoring, but I'll keep that for another day 😄.

@iMacTia iMacTia merged commit f53b0ca into lostisland:master Jan 31, 2019
@PChambino PChambino deleted the brotli-optional-dependency branch February 1, 2019 09:45
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.

2 participants