]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-worker.cc
make expected-size a maximum-size check as this is what we want at this point
[apt.git] / apt-pkg / acquire-worker.cc
index 8bd1618f4b09efb69fd49f0029e88c6b43c426cb..ffa84eb68d30988fc471c209544ec3c2d9a513f9 100644 (file)
@@ -526,9 +526,6 @@ bool pkgAcquire::Worker::QueueItem(pkgAcquire::Queue::QItem *Item)
    if (OutFd == -1)
       return false;
    
-   string ExpectedSize;
-   strprintf(ExpectedSize, "%llu", Item->Owner->FileSize);
-
    string Message = "600 URI Acquire\n";
    Message.reserve(300);
    Message += "URI: " + Item->URI;
@@ -536,7 +533,12 @@ bool pkgAcquire::Worker::QueueItem(pkgAcquire::Queue::QItem *Item)
    HashStringList const hsl = Item->Owner->HashSums();
    for (HashStringList::const_iterator hs = hsl.begin(); hs != hsl.end(); ++hs)
       Message += "\nExpected-" + hs->HashType() + ": " + hs->HashValue();
-   Message += "\nExpected-Size: " + ExpectedSize;
+   if(Item->Owner->FileSize > 0)
+   {
+      string MaximumSize;
+      strprintf(MaximumSize, "%llu", Item->Owner->FileSize);
+      Message += "\nMaximum-Size: " + MaximumSize;
+   }
    Message += Item->Owner->Custom600Headers();
    Message += "\n\n";