Bug#79878: No size in HTTP response causes Size mismatch error
Package: apt
Version: 0.3.19
Severity: normal
When apt-proxy cannot determine the size of a .deb file from
the Packages file (which is basically impossible now that we
have the pools), it responds to apt-get with a HTTP header
that specifies no size and reverts to Connect: close.
After the file is transfered, apt-get reports "Size mismatch"
even though the file has been transfered correctly.
The following patch fixes it, but I am not sure if this is the
correct fix.
diff -ruN apt-0.3.19/apt-pkg/acquire-item.cc apt-0.3.19.1/apt-pkg/acquire-item.cc
--- apt-0.3.19/apt-pkg/acquire-item.cc Tue Feb 1 07:11:09 2000
+++ apt-0.3.19.1/apt-pkg/acquire-item.cc Mon Dec 18 13:20:18 2000
@@ -481,7 +481,7 @@
Item::Done(Message,Size,Md5Hash,Cfg);
// Check the size
- if (Size != Version->Size)
+ if ((Size != 0) && (Size != Version->Size))
{
Status = StatError;
ErrorText = "Size mismatch";
-- System Information
Debian Release: woody
Architecture: i386
Kernel: Linux wattle 2.4.0-test12 #2 Thu Dec 14 09:47:18 EST 2000 i686
Versions of packages apt depends on:
ii libc6 2.2-5 GNU C Library: Shared libraries an
ii libstdc++2.10 1:2.95.2-14 The GNU stdc++ library
Reply to: