django-revproxy
django-revproxy copied to clipboard
StreamingHTTPResponse and hardcoded threshold
Hi, I was wondering if you had a special reason to hardcode a very low threshold for returning a StreamingHTTPResponse
instead of HTTPResponse
.
To my understanding, the Django docs generally discourage the use of StreamingHTTPResponse
:
https://docs.djangoproject.com/en/2.0/ref/request-response/#streaminghttpresponse-objects
How about making this user configurable and add the option not to use StreamingHTTPResponse
at all?
I'd put together a PR for that in case you support the idea.
The reason is that this might proxy very big files and in those cases we had a major memory issue due to that.
Anyway I support the idea of allowing the user to choose what's the best MIN_STREAMING_LENGTH
and maybe None
meaning streaming shouldn't be used.
Alright then, I've already prepared a proposal. PR is coming soon after the polishing is done.