diff options
| author | Julian Andres Klode <jak@debian.org> | 2020-12-18 21:00:29 +0000 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2020-12-18 21:00:29 +0000 |
| commit | 06ec0067057e0578f3bc515f6a97d6a9d70824f6 (patch) | |
| tree | e0cb170d0a4f8caff89c2402bf24e6951b716360 /methods/aptmethod.h | |
| parent | ece7f5bb0afee0994a4fb4380e756ce725fe67a9 (diff) | |
| parent | a5859bafdaa6bcf12934d0fb1715a5940965e13a (diff) | |
Merge branch 'pu/uriencode' into 'master'
Use encoded URIs in the acquire system
See merge request apt-team/apt!139
Diffstat (limited to 'methods/aptmethod.h')
| -rw-r--r-- | methods/aptmethod.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/methods/aptmethod.h b/methods/aptmethod.h index 67d5a3a0b..7038131cf 100644 --- a/methods/aptmethod.h +++ b/methods/aptmethod.h @@ -475,6 +475,18 @@ protected: QueueBack = Queue; delete Tmp; } + static std::string URIEncode(std::string const &part) + { + // The "+" is encoded as a workaround for an S3 bug (LP#1003633 and LP#1086997) + return QuoteString(part, _config->Find("Acquire::URIEncode", "+~ ").c_str()); + } + + static std::string DecodeSendURI(std::string const &part) + { + if (_config->FindB("Acquire::Send-URI-Encoded", false)) + return DeQuoteString(part); + return part; + } aptMethod(std::string &&Binary, char const *const Ver, unsigned long const Flags) APT_NONNULL(3) : pkgAcqMethod(Ver, Flags), Binary(Binary), SeccompFlags(0), methodNames({Binary}) |
