summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/editing/dnd/resources/32mb.py
blob: 8513f227e9cd790c443ba53b0d149b1b234f0f68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
thirty_two_megabytes = 32 * 1024 * 1024
chunk = b'ab' * 512 * 512
chunk_length = len(chunk)

def main(request, response):
    def content():
        bytes_sent = 0
        while bytes_sent < thirty_two_megabytes:
            yield chunk
            bytes_sent += chunk_length

    return [(b"Content-Type", b"text/plain")], content()