Skip to content

Fix test_gzip_ignored_for_responses_with_encoding_set w/ brotli#1962

Merged
Kludex merged 1 commit intoKludex:masterfrom
mgorny:brotli-test
Nov 23, 2022
Merged

Fix test_gzip_ignored_for_responses_with_encoding_set w/ brotli#1962
Kludex merged 1 commit intoKludex:masterfrom
mgorny:brotli-test

Conversation

@mgorny
Copy link
Contributor

@mgorny mgorny commented Nov 22, 2022

Use a fake "text" Content-Encoding instead of "br" for test_gzip_ignored_for_responses_with_encoding_set. The latter currently fails if an implementation of brotli is actually installed, since the test uses fake content that is not valid Brotli stream. Rather than forcing a dependency on Brotli decoder, just use a custom Content-Encoding that should not yield any implicit processing.

Closes #1957

Use a fake "text" Content-Encoding instead of "br"
for test_gzip_ignored_for_responses_with_encoding_set.  The latter
currently fails if an implementation of brotli is actually installed,
since the test uses fake content that is not valid Brotli stream.
Rather than forcing a dependency on Brotli decoder, just use a custom
Content-Encoding that should not yield any implicit processing.

Closes Kludex#1597
@mgorny
Copy link
Contributor Author

mgorny commented Nov 22, 2022

It might also be a good idea to add separate variants with and without brotlicffi installed to the test matrix. However, I don't have a good idea how to integrate it with the scripts/* model.

@Kludex
Copy link
Owner

Kludex commented Nov 23, 2022

I'd say this is good enough. We are testing that, if we set the Content-Encoding, then we don't apply the GZipMidldeware.

@Kludex
Copy link
Owner

Kludex commented Nov 23, 2022

Thanks @mgorny !

@mgorny
Copy link
Contributor Author

mgorny commented Nov 23, 2022

Thanks!

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.

test_gzip_ignored_for_responses_with_encoding_set fails if brotlicffi is installed

2 participants