tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

32mb.py (334B)


      1 thirty_two_megabytes = 32 * 1024 * 1024
      2 chunk = b'ab' * 512 * 512
      3 chunk_length = len(chunk)
      4 
      5 def main(request, response):
      6    def content():
      7        bytes_sent = 0
      8        while bytes_sent < thirty_two_megabytes:
      9            yield chunk
     10            bytes_sent += chunk_length
     11 
     12    return [(b"Content-Type", b"text/plain")], content()