mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-11-14 14:47:19 +00:00
Workaround for '+' escaping in Amazon S3. #130
This commit is contained in:
1 parent
80a88a2248
commit
552b11e28d
3 files changed
+11
-3
No files matched your search
+9
-1
@@ -140,7 +140,15 @@ func (downloader *downloaderImpl) DownloadWithChecksum(url string, destination s
|
||||
func (downloader *downloaderImpl) handleTask(task *downloadTask) {
|
||||
downloader.progress.Printf("Downloading %s...\n", task.url)
|
||||
|
||||
resp, err := downloader.client.Get(task.url)
|
||||
req, err := http.NewRequest("GET", task.url, nil)
|
||||
if err != nil {
|
||||
task.result <- fmt.Errorf("%s: %s", task.url, err)
|
||||
return
|
||||
}
|
||||
|
||||
req.URL.Opaque = strings.Replace(req.URL.RequestURI(), "+", "%2b", -1)
|
||||
|
||||
resp, err := downloader.client.Do(req)
|
||||
if err != nil {
|
||||
task.result <- fmt.Errorf("%s: %s", task.url, err)
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user