Skip to content
This repository has been archived by the owner on Jan 13, 2021. It is now read-only.

Brotli #339

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions hyper/http20/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ def strip_headers(headers):
b'deflate': DeflateDecoder
}

try:
import brotli
decompressors[b"br"] = brotli.Decompressor
except ImportError:
pass


class HTTP20Response(object):
"""
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def run_tests(self):
],
},
extras_require={
'brotli': ['brotlipy'],
'fast': ['pycohttpparser'],
# Fallback to good SSL on bad Python versions.
':python_full_version < "2.7.9"': [
Expand Down