summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-06-09 21:15:52 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-06-09 21:15:52 +0200
commitc91d9a630bfe95f152d574a0ca420fde2afc6b2c (patch)
treefa2d9dd359aae107fa781b6b73531c3a38fdb162 /apt-pkg
parent24d7b6267ef3e475a153d4e2c4bcb30e1d14e671 (diff)
sent Last-Modified header also for Translation files
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 4d9a152ab..58754a5c0 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -140,7 +140,8 @@ void pkgAcquire::Item::Rename(string From,string To)
}
}
/*}}}*/
-
+// Acquire::Item::ReportMirrorFailure /*{{{*/
+// ---------------------------------------------------------------------
void pkgAcquire::Item::ReportMirrorFailure(string FailCode)
{
// we only act if a mirror was used at all
@@ -182,7 +183,7 @@ void pkgAcquire::Item::ReportMirrorFailure(string FailCode)
_config->Find("Methods::Mirror::ProblemReporting").c_str());
}
}
-
+ /*}}}*/
// AcqDiffIndex::AcqDiffIndex - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* Get the DiffIndex file first and see if there are patches availabe
@@ -835,7 +836,13 @@ pkgAcqIndexTrans::pkgAcqIndexTrans(pkgAcquire *Owner,
// ---------------------------------------------------------------------
string pkgAcqIndexTrans::Custom600Headers()
{
- return "\nFail-Ignore: true";
+ string Final = _config->FindDir("Dir::State::lists");
+ Final += URItoFileName(RealURI);
+
+ struct stat Buf;
+ if (stat(Final.c_str(),&Buf) != 0)
+ return "\nFail-Ignore: true";
+ return "\nFail-Ignore: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
}
/*}}}*/
// AcqIndexTrans::Failed - Silence failure messages for missing files /*{{{*/