Commit 57405e9
authored
feat: Support urllib3 >= 2.6.0 (#1658)
feat: Support urllib3 >= 2.6.0
**Context**:
* This library implements a custom decoders ( `_GzipDecoder` ,
`_BrotliDecoder` ) which inherit from `urllib3.response.ContentDecoder`
* Interface of `urllib3.response.ContentDecoder` was changed in
[2.6.0](https://urllib3.readthedocs.io/en/stable/changelog.html#id1) to
fix security vulnerability for highly compressed data reads.
(Decompression bombs)
Hence we need to change our interfaces as well.
**Changes**
* Add `max_length` param on decompress method, provide default value of
-1 (same as urllib3's decompress)
* Provide backwards compatibility ( ie urllib3 <= 2.5.0)1 parent ddce7e5 commit 57405e9
File tree
2 files changed
+17
-5
lines changed- google/cloud/storage/_media/requests
- testing
2 files changed
+17
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
711 | 711 | | |
712 | 712 | | |
713 | 713 | | |
714 | | - | |
| 714 | + | |
715 | 715 | | |
716 | 716 | | |
717 | 717 | | |
| |||
721 | 721 | | |
722 | 722 | | |
723 | 723 | | |
724 | | - | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
725 | 729 | | |
726 | 730 | | |
727 | 731 | | |
| |||
747 | 751 | | |
748 | 752 | | |
749 | 753 | | |
750 | | - | |
| 754 | + | |
751 | 755 | | |
752 | 756 | | |
753 | 757 | | |
| |||
757 | 761 | | |
758 | 762 | | |
759 | 763 | | |
760 | | - | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
761 | 769 | | |
762 | 770 | | |
763 | 771 | | |
764 | 772 | | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
765 | 778 | | |
766 | 779 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
0 commit comments