From f2f8e89f08cdf01c83a0b8ab053c65329d85ca90 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 26 Jul 2017 18:35:42 +0200 Subject: fail early in http if server answer is too small as well Failing on too much data is good, but we can do better by checking for exact filesizes as we know with hashsums how large a file should be, so if we get a file which has a size we do not expect we can drop it directly, regardless of if the file is larger or smaller than what we expect which should catch most cases which would end up as hashsum errors later now a lot sooner. --- test/integration/test-apt-update-transactions | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'test/integration/test-apt-update-transactions') diff --git a/test/integration/test-apt-update-transactions b/test/integration/test-apt-update-transactions index ab678c133..1f30d7737 100755 --- a/test/integration/test-apt-update-transactions +++ b/test/integration/test-apt-update-transactions @@ -16,16 +16,10 @@ insertsource 'unstable' 'foo' 'i386' '1.0' setupaptarchive --no-update breakfile() { - mv "${1}" "${1}.bak" - mv "${1}.gz" "${1}.gz.bak" - cat > "$1" <