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

Support BufferRequests in HttpClient based backends #3958

Merged
merged 1 commit into from
Oct 26, 2019

Conversation

tygill
Copy link
Contributor

@tygill tygill commented Oct 23, 2019

This change uses the HttpCompletionOptions to support the BufferRequests (--http-enable-buffering) setting in HttpClient based backends.

Both .Net and Mono appear to treat HttpCompletionOption.ResponseContentRead as a signal to cache the response, and HttpCompletionOption.ResponseHeadersRead as a signal to not cache the response.

Note that this will also change the default behavior to not buffer, as previously HttpClient based backends (which looks like it is just the MicrosoftGraphBackend's derivatives) would use the default, which was to have responses buffered.

This change is largely motivated by Duplicati throwing out of memory errors which seem to be related to attempting to allocate a memory stream to cache the full response when running on a Raspberry Pi with limited memory.

@duplicatibot
Copy link

This pull request has been mentioned on Duplicati. There might be relevant details there:

https://forum.duplicati.com/t/onedrive-v2-memory-leak/6112/29

@warwickmm warwickmm merged commit f23bcdc into duplicati:master Oct 26, 2019
@tygill tygill deleted the feature/buffer-reads-httpclient branch October 30, 2019 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants