title: Connection broken: IncompleteRead(0 bytes read) when sending request to Django on Heroku
body: <p>I have a view that returns a JsonResponse in Django</p>
  
  <pre><code>def some_view(request):
      return JsonResponse({'a': 1, 'b': 2})
  </code></pre>
  
  <p>And somewhere else in side the same project, I have a piece of code that sends a GET request to the url corresponds to that view:</p>
  
  <pre><code>import requests
  def client_func():
      requests.get(url_to_some_views)
  </code></pre>
  
  <p>It works on my local machine but after deploying to heroku, sometimes I get the error: <code>('Connection broken: IncompleteRead(0 bytes read)', IncompleteRead(0 bytes read))</code></p>
  
  <p>After some testing, I found out that there is an extra field in the response header of <code>some_view</code>: <code>transfer-encoding: chunked</code> so I guess it might be what caused the problem but I'm still not sure how to handle this. So far I have tried to add <code>stream=True</code> to the get call in <code>client_func</code> but the problem still persists.</p>
  
  <p>Can someone help me with that might be the cause of my problem and to solve this please. Thank you very much!</p>