Bug 1508049: [funsize] Don't verify decoded download length against HTTP header; r=sfraser
authorTom Prince <mozilla@hocat.ca>
Tue, 20 Nov 2018 21:25:56 +0000
changeset 506853 9201152ee77ca64d5cf737fb29e578e348916705
parent 506852 493083d55865df594eef9f26c5ba7a98873cacb1
child 506854 209dc0bf2b647b90b1f56b439f82c90df2b3698e
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfraser
bugs1508049
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1508049: [funsize] Don't verify decoded download length against HTTP header; r=sfraser When Content-Encoding is specified, the decoded length won't match the lenght in the header. In any case aiohttp has code that verifies the length, so we don't need to do it as well. Differential Revision: https://phabricator.services.mozilla.com/D12342
taskcluster/docker/funsize-update-generator/scripts/funsize.py
--- a/taskcluster/docker/funsize-update-generator/scripts/funsize.py
+++ b/taskcluster/docker/funsize-update-generator/scripts/funsize.py
@@ -131,20 +131,16 @@ async def download(url, dest, mode=None)
                     fd.write(chunk)
                     bytes_downloaded += len(chunk)
                     log_interval -= len(chunk)
                     if log_interval <= 0:
                         log.debug("Bytes downloaded for %s: %d", url, bytes_downloaded)
                         log_interval = chunk_size * 1024
 
             log.debug('Downloaded %s bytes', bytes_downloaded)
-            if 'content-length' in resp.headers:
-                log.debug('Content-Length: %s bytes', resp.headers['content-length'])
-                if bytes_downloaded != int(resp.headers['content-length']):
-                    raise IOError('Unexpected number of bytes downloaded')
             if mode:
                 log.debug("chmod %o %s", mode, dest)
                 os.chmod(dest, mode)
 
 
 async def run_command(cmd, cwd='/', env=None, label=None, silent=False):
     if not env:
         env = dict()