diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-11-21 13:47:19 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-11-21 13:47:19 +0100 |
commit | abd6af5a1ce2c20a5742c5c3182dfadce10367ca (patch) | |
tree | 43acb35aa3174c2c44d7e3dac92b194deac3582a /test/integration | |
parent | 89497574da3dd40076d955efc936b54e76a8c59c (diff) |
do not sent Last-Modified if we expect a changed file
In 8d041b4f we made apt figure out based on the last Release file it has
if it should request a file or not given that the hashes changed or not.
So if we have a last Release file and do a request, do not sent a
Last-Modified header as we expect a change so much that a non-change
would indeed be an error. The Last-Modified header is therefore at best
ignored by the server, so sending it is just wasted effort. In the worst
case as time is a fragile thing the server decides against sending us an
update with the idea that we already have the latest content, which we
know for a fact that we haven't. Given that we sent less information to
the server our request is on its own also less identifiable as coming
from a returning or new user.
The disadvantage is that if we end up getting an old index file after
getting a new Release file from another mirror the old mirror will not
be able to tell us 'Hit', but instead sends us the complete file we
discard, but both lets us end up with the same error class in the end,
so the difference isn't big in practice.
Diffstat (limited to 'test/integration')
-rwxr-xr-x | test/integration/test-apt-update-stale | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/integration/test-apt-update-stale b/test/integration/test-apt-update-stale index fd5ec8214..c01a2a1d4 100755 --- a/test/integration/test-apt-update-stale +++ b/test/integration/test-apt-update-stale @@ -39,6 +39,6 @@ cp -p aptarchive/dists/unstable/main/binary-i386/saved/Packages* \ aptarchive/dists/unstable/main/binary-i386/ # ensure this raises an error -testfailuremsg "W: Failed to fetch copy:$(readlink -f ./rootdir)/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_binary-i386_Packages Hash Sum mismatch +testfailuremsg "W: Failed to fetch http://localhost:${APTHTTPPORT}/dists/unstable/main/binary-i386/Packages.gz Hash Sum mismatch E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -o Debug::pkgAcquire::Worker=1 -o Debug::Acquire::http=1 testfileequal lists.before "$(listcurrentlistsdirectory)" |