Skip to content

Commit 0761f2e

Browse files
disable content observing for streaming requests (#1221)
1 parent 421297c commit 0761f2e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44

5+
- fix: OOMing on large downloads [#1214](https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/1214)
56
- feat: support downloading from multiple albums [#738](https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/738) [#438](https://github.com/icloud-photos-downloader/icloud_photos_downloader/issues/438)
67

78
## 1.30.0 (2025-08-17)

src/foundation/http.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@ def cookie_str_to_dict(cookie_header: str) -> Mapping[str, str]:
3232

3333

3434
def response_body(response: Response) -> Any:
35-
try:
36-
return response.json()
37-
except Exception:
38-
return response.text
35+
if response.raw.stream:
36+
return None
37+
else:
38+
try:
39+
return response.json()
40+
except Exception:
41+
return response.text
3942

4043

4144
def request_body(request: PreparedRequest) -> Any:

0 commit comments

Comments
 (0)