Re: StreamingHttpResponse response length in a stats middleware

2017-01-18 Thread 'Tom Evans' via Django users
On Wed, Jan 18, 2017 at 11:42 AM, Stefano Tranquillini wrote: > Hi there, > > I'm using the StreamingHttpResponse to stream a response, it works great. > Now, I've a middleware that measures the size of req/response that users do. > For normal HttpResponse i use

StreamingHttpResponse response length in a stats middleware

2017-01-18 Thread Stefano Tranquillini
Hi there, I'm using the StreamingHttpResponse to stream a response, it works great. Now, I've a middleware that measures the size of req/response that users do. For normal HttpResponse i use len(response.content) [i know that it does not give the bytes, but it's pretty close], for the