Tornado proxy big files

I have a Tornado proxy which must proxy sometimes big files (1G or more, although for testing im using one file of 600Mb):

class scriptserverHandler(basehandler.BaseHandler):
    http_client = httpclient.AsyncHTTPClient()
    async def get(self, keys):
        self.request.connection.set_max_body_size(1000000000)
        headers = {}
        headers['real_user'] = self.user
        #headers['X-Forwarded-User'] = 'jgarcia@pmpconseil.com'
        html = ""
        #r = await requests.get(f"http://pmplab-apps-service:5000/{keys}", headers=headers)
        r = httpclient.HTTPRequest(
            url = f"http://pmplab-serverscript-service:5000/{keys}",
            headers=headers,
            )
        self.http_client._max_body_size = 1048576000
        print("Test1")
        r = await self.http_client.fetch(r)
        print("Test2")
        for k in r.headers.keys():
             self.set_header(k, r.headers[k])
        self.set_header('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0')
        html = r.body
        self.write(html)

But i get always Content-length too long whenever i try to proxy a big file. I have tried already:

  1. Set http_client = httpclient.AsyncHTTPClient(max_body_size=1000000000) below http_client declaration.
  2. Set self.http_client._max_body_size=1000000000 inside get method.
  3. Set self.request.connection.set_max_body_size(1000000000) inside get method

But nothing worked.

I know that the problem is when i request the big file from tornado between print("test1") and print("test2")