]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-item.cc
merge from the mvo branch
[apt.git] / apt-pkg / acquire-item.cc
index 4f0abbb91ddb6b9b95015a0aecdd3e3d2bae9468..6d4336425482bfa01d1d0deef027078a68f75455 100644 (file)
@@ -1547,8 +1547,9 @@ void pkgAcqArchive::Finished()
 /* The file is added to the queue */
 pkgAcqFile::pkgAcqFile(pkgAcquire *Owner,string URI,string Hash,
                       unsigned long Size,string Dsc,string ShortDesc,
-                      const string &DestDir, const string &DestFilename) :
-                       Item(Owner), ExpectedHash(Hash)
+                      const string &DestDir, const string &DestFilename,
+                       bool IsIndexFile) :
+                       Item(Owner), ExpectedHash(Hash), IsIndexFile(IsIndexFile)
 {
    Retries = _config->FindI("Acquire::Retries",0);
    
@@ -1663,3 +1664,12 @@ void pkgAcqFile::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
    Item::Failed(Message,Cnf);
 }
                                                                        /*}}}*/
+// AcqIndex::Custom600Headers - Insert custom request headers          /*{{{*/
+// ---------------------------------------------------------------------
+/* The only header we use is the last-modified header. */
+string pkgAcqFile::Custom600Headers()
+{
+   if (IsIndexFile)
+      return "\nIndex-File: true";
+}
+                                                                       /*}}}*/