Skip to content

Commit

Permalink
Revert removal of caching full HTTP response. See #966 for details.
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmer committed May 17, 2022
1 parent 4fbb4e6 commit 877095b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
* Increase tolerance when comparing time stamps; fixes some
spurious test failures on slow CI systems. (Jelmer Vernooij)

* Revert removal of caching of full HTTP response. This breaks
access to some HTTP servers.
(Jelmer Vernooij)

0.20.37 2022-05-16

* Avoid making an extra copy when fetching pack files.
Expand Down
4 changes: 3 additions & 1 deletion dulwich/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2232,7 +2232,9 @@ def _http_request(self, url, headers=None, data=None, allow_compression=False):
resp.redirect_location = resp.get_redirect_location()
else:
resp.redirect_location = resp_url if resp_url != url else ""
return resp, resp.read
# TODO(jelmer): Remove BytesIO() call that caches entire response in
# memory. See https://github.com/jelmer/dulwich/issues/966
return resp, BytesIO(resp.data).read


HttpGitClient = Urllib3HttpGitClient
Expand Down

0 comments on commit 877095b

Please sign in to comment.