I am attempting to download a track from http://freemusicarchive.org. Generally speaking, you can download a file by appending /download to the track URL, which responds with a redirect to the asset on S3.
For example, try this link: http://freemusicarchive.org//music//Zola_Jesus//Live_at_WFMU_on_Scott_McDowells_Show_1709//Odessa/download
To see the redirect, put that link here: http://www.wheregoes.com/retracer.php
I am able to get the redirect location with code that looks like this:
req, err := http.NewRequest("GET", url, nil)
errHndlr(err)
transport := http.Transport{}
resp, err := transport.RoundTrip(req)
defer resp.Body.Close()
errHndlr(err)
redirect := resp.Header.Get("Location")
I have verified the redirect link works by printing it to the console and copy/pasting it into my browser, but when I call http.Get on the same url, I get a "SignatureDoesNotMatch" error from AWS.
If anyone can offer insight as to what is going wrong here, I would greatly appreciate it.