diff options
author | David Kalnischkies <david@kalnischkies.de> | 2017-07-24 14:30:41 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2017-07-26 19:07:56 +0200 |
commit | d7518dba50e2285c41c7002a1d86f876401fd9ea (patch) | |
tree | 1e172f084046a2fa4d73959fd341da1f8f7483eb /test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum | |
parent | 85f4a655cdc4d16c1b95de6fad7f3cd955265e46 (diff) |
fail earlier if server answers with too much data
We tend to operate on rather large static files, which means we usually
get Content-Length information from the server. If we combine this
information with the filesize we are expecting (factoring in pipelining)
we can avoid reading a bunch of data we are ending up rejecting anyhow
by just closing the connection saving bandwidth and time both for the
server as well as the client.
Diffstat (limited to 'test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum')
-rwxr-xr-x | test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum b/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum index 2636c3140..14e5a20b8 100755 --- a/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum +++ b/test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum @@ -216,7 +216,7 @@ testmismatch() { Need to get 6 B of source archives. Get:1 http://localhost:${APTHTTPPORT} $1 1.0 (dsc) [2 B] Err:1 http://localhost:${APTHTTPPORT} $1 1.0 (dsc) - Writing more data than expected (3 > 2) + File is larger than expected (3 > 2). Mirror sync in progress? Hashes of expected file: - SHA256:943d3bf22ac661fb0f59bc4ff68cc12b04ff17a838dfcc2537008eb9c7f3770a - Filesize:2 [weak] @@ -230,7 +230,7 @@ Err:2 http://localhost:${APTHTTPPORT} $1 1.0 (tar) - SHA256:90aebae315675cbf04612de4f7d5874850f48e0b8dd82becbeaa47ca93f5ebfb - Filesize:3 [weak] Last modification reported: $(lastmodification "aptarchive/${1}_1.0.dsc") -E: Failed to fetch http://localhost:${APTHTTPPORT}/${1}_1.0.dsc Writing more data than expected (3 > 2) +E: Failed to fetch http://localhost:${APTHTTPPORT}/${1}_1.0.dsc File is larger than expected (3 > 2). Mirror sync in progress? Hashes of expected file: - SHA256:943d3bf22ac661fb0f59bc4ff68cc12b04ff17a838dfcc2537008eb9c7f3770a - Filesize:2 [weak] |