Skip to content

Brotli support not indicated by client through Accept-Encoding header #5219

Closed
@rgeronimi

Description

🐞 Describe the bug
The aiohttp client does not send "br" in the "Accept-Encoding" header when brotli is enabled on the system

💡 To Reproduce
Install brotlipy
Make an aiohttp request to a server, logging the request headers. The Accept-Encoding header will indicate support for gzip and deflate but not br (brotli).

💡 Expected behavior
Brotli, when it is enabled, shall benefit from the same level of automatic support than gzip or deflate.

📋 Your version of the Python
3.7.8

📋 Your version of the aiohttp/yarl/multidict distributions

Name: aiohttp
Version: 3.7.2
Summary: Async http client/server framework (asyncio)
Home-page: https://github.com/aio-libs/aiohttp
Author: Nikolay Kim
Author-email: fafhrd91@gmail.com
License: Apache 2
Location: /usr/local/Caskroom/miniconda/base/envs/myenv/lib/python3.7/site-packages
Requires: attrs, yarl, multidict, async-timeout, chardet, typing-extensions
Required-by: slackclient, gcsfs
Name: multidict
Version: 5.0.0
Summary: multidict implementation
Home-page: https://github.com/aio-libs/multidict
Author: Andrew Svetlov
Author-email: andrew.svetlov@gmail.com
License: Apache 2
Location: /usr/local/Caskroom/miniconda/base/envs/myenv/lib/python3.7/site-packages
Requires: 
Required-by: yarl, sanic, aiohttp
Name: yarl
Version: 1.6.2
Summary: Yet another URL library
Home-page: https://github.com/aio-libs/yarl/
Author: Andrew Svetlov
Author-email: andrew.svetlov@gmail.com
License: Apache 2
Location: /usr/local/Caskroom/miniconda/base/envs/myenv/lib/python3.7/site-packages
Requires: idna, multidict, typing-extensions
Required-by: aiohttp

📋 Additional context
MacOS 10.15.7

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions