Add support for brotli decoding

When the `brotli` or `brotlicffi` packages are installed, `urllib3.util.make_headers()` inserts ',br' in the Accept-Encoding header and decodes br from the answers.

Should that not be something more along the lines of...

```python
make_headers(accept_encoding=True).get('accept-encoding', ', '.join(('gzip', 'deflate'))),
```

as a 'fail safe'

You can change it as you want, as long Requests sends transparently `Accept-Encoding: br`.

.join is an overkiller to generate a constant string.

My 2c: I like the approach of reusing code from urllib3 more than mine from #5554. :)

However the [minimal supported by requests version of urllib3 is now 1.21.1](https://github.com/psf/requests/blob/master/setup.py#L46), which [does not support brotli yet](https://github.com/urllib3/urllib3/blame/1.21.1/urllib3/util/request.py). The [minimal version that has this support is 1.25.1](https://github.com/urllib3/urllib3/commit/9eecb6bd0fab0a4546dd35c7ee42e8cd9c59274f). So I think that it should be mentioned in docs update here, along with info about required `brotli` or `brotlicffi` packages.

Such fail-safe is not needed, @VeNoMouS , as even the oldest supported by requests urllib3 has `make_headers()` that will return a dict with `Accept-Encoding` key, when called with `accept_encoding=True`.

See https://github.com/urllib3/urllib3/blame/1.21.1/urllib3/util/request.py#L7-L55 .

> However the [minimal supported by requests version of urllib3 is now 1.21.1](https://github.com/psf/requests/blob/master/setup.py#L46), which [does not support brotli yet](https://github.com/urllib3/urllib3/blame/1.21.1/urllib3/util/request.py). The [minimal version that has this support is 1.25.1](https://github.com/urllib3/urllib3/commit/9eecb6bd0fab0a4546dd35c7ee42e8cd9c59274f). So I think that it should be mentioned in docs update here, along with info about required `brotli` or `brotlicffi` packages.

Please propose wording and where to update the text.  Currently the brotli-texts are updated on three places - faq, history and quickstart.  I consider it better, if the documentation does not repeat the same thing on different places.

I apologize If this might come off as a bit rude but this PR seems to be the only thing blocking 2.26.0 milestone (the other changes in it have no pending change requested), and it's been a month without any progress, if for more time is needed that's of course understandable but would it be possible to bump this for a release after the next one so as not to have it block other changes from being released?

ap

On Mon, Jun 14, 2021, 1:46 AM Naor Livne ***@***.***> wrote:
nah..

> I apologize If this might come off as a bit rude but this PR seems to be
> the only thing blocking 2.26.0 milestone (the other changes in it have no
> pending change requested), and it's been a month without any progress, if
> for more time is needed that's of course understandable but would it be
> possible to bump this for the next release then so as not to have it block
> other changes from being released?
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/psf/requests/pull/5783#issuecomment-860510546>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AUCGM53SLAID7PCJ7LV3QULTSW6YBANCNFSM42AFENQQ>
> .
>


Just bump 2.2.1 for the update ... majority needs to redilimbruim it's
depth not making it by lying ..add support!

On Mon, Jun 14, 2021, 10:38 AM Juan E Alcantar <
***@***.***> wrote:

> ap
>
> On Mon, Jun 14, 2021, 1:46 AM Naor Livne ***@***.***>
> wrote: nah..
>
>> I apologize If this might come off as a bit rude but this PR seems to be
>> the only thing blocking 2.26.0 milestone (the other changes in it have no
>> pending change requested), and it's been a month without any progress, if
>> for more time is needed that's of course understandable but would it be
>> possible to bump this for the next release then so as not to have it block
>> other changes from being released?
>>
>> —
>> You are receiving this because you are subscribed to this thread.
>> Reply to this email directly, view it on GitHub
>> <https://github.com/psf/requests/pull/5783#issuecomment-860510546>, or
>> unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AUCGM53SLAID7PCJ7LV3QULTSW6YBANCNFSM42AFENQQ>
>> .
>>
>