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/http.cc | |
| 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/http.cc')
| -rw-r--r-- | methods/http.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/methods/http.cc b/methods/http.cc index 0ef695166..b6d754037 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -901,9 +901,8 @@ void HttpMethod::SendReq(FetchItem *Itm) else requesturi = Uri; - // The "+" is encoded as a workaround for a amazon S3 bug - // see LP bugs #1003633 and #1086997. - requesturi = QuoteString(requesturi, "+~ "); + if (not _config->FindB("Acquire::Send-URI-Encoded", false)) + requesturi = URIEncode(requesturi); /* Build the request. No keep-alive is included as it is the default in 1.1, can cause problems with proxies, and we are an HTTP/1.1 @@ -1022,7 +1021,7 @@ BaseHttpMethod::DealWithHeadersResult HttpMethod::DealWithHeaders(FetchResult &R return FILE_IS_OPEN; } /*}}}*/ -HttpMethod::HttpMethod(std::string &&pProg) : BaseHttpMethod(std::move(pProg), "1.2", Pipeline | SendConfig) /*{{{*/ +HttpMethod::HttpMethod(std::string &&pProg) : BaseHttpMethod(std::move(pProg), "1.2", Pipeline | SendConfig | SendURIEncoded) /*{{{*/ { SeccompFlags = aptMethod::BASE | aptMethod::NETWORK; |
