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

aiohttp client support for Brotli compression #2270

Closed
kakarukeys opened this issue Sep 14, 2017 · 4 comments
Closed

aiohttp client support for Brotli compression #2270

kakarukeys opened this issue Sep 14, 2017 · 4 comments
Labels

Comments

@kakarukeys
Copy link

Long story short

Currently unable to read brotli-compressed response. Is the support on the roadmap?

Expected behaviour

Able to read.

Actual behaviour

awaiting response.text will raise
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe7 in position 5: invalid continuation byte

Steps to reproduce

import asyncio, aiohttp
run = asyncio.get_event_loop().run_until_complete

async def f():
    async with aiohttp.ClientSession(headers={'Accept-Encoding': 'br'}) as session:
        async with session.get("https://www.amazon.com") as resp:
            html = await resp.text()

run(f())

Your environment

Python 3.6.2
aiohttp==2.2.5
chardet==3.0.4
on Linux Mint 13

@asvetlov
Copy link
Member

Never heard about Brotli before :)
But PR is welcome!

@fafhrd91
Copy link
Member

I think brotli is from dropbox? should be easy to add.

yes, PR is always welcome

@asvetlov
Copy link
Member

Fixed by #2312

@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants