summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2021-03-06 16:11:34 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2021-03-07 02:55:07 +0100
commit2a81f98b124d8fe551b160df55db1d3bf79a77c1 (patch)
tree24a6bc2a81d4b3d7ab716a1f5fd7acb619f0e528 /apt-pkg
parent59933938f51105066161a6eb88253006826336a2 (diff)
Ensure all index files sent custom tags to the methods
The mirror method can distribute requests for files based on various metadata bits, but some – the main index files – weren't actually passing those on to the methods as advertised in the manpage. This is hidden both by mirror usually falling back to other sources which will eventually hit the right one and that if the repository does not support by-hash apt will automatically stick to the mirror which was used for the Release file.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index cc3d2f1ff..ab4306aac 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -3177,8 +3177,8 @@ void pkgAcqIndex::Init(string const &URI, string const &URIDesc,
/* The only header we use is the last-modified header. */
string pkgAcqIndex::Custom600Headers() const
{
-
- string msg = "\nIndex-File: true";
+ std::string msg = pkgAcqBaseIndex::Custom600Headers();
+ msg.append("\nIndex-File: true");
if (TransactionManager->LastMetaIndexParser == NULL)
{
@@ -3930,9 +3930,10 @@ void pkgAcqFile::Done(string const &Message,HashStringList const &CalcHashes,
/*}}}*/
string pkgAcqFile::Custom600Headers() const /*{{{*/
{
- if (IsIndexFile)
- return "\nIndex-File: true";
- return "";
+ string Header = pkgAcquire::Item::Custom600Headers();
+ if (not IsIndexFile)
+ return Header;
+ return Header + "\nIndex-File: true";
}
/*}}}*/
pkgAcqFile::~pkgAcqFile() {}