getsolus / solbuild

The Solus package build system
https://getsol.us
Apache License 2.0
19 stars 12 forks source link

Fix sourceforge URLS #62

Closed ReillyBrogan closed 7 months ago

ReillyBrogan commented 8 months ago

Sourceforge does a lot of redirects to the final download destination and the Golang HTTP client doesn't seem to handle this very well out of the box. We can fix this by stripping the Referer header from all HTTP requests following the redirects.

I wasn't able to make this work with adding this to the grab httpclient (probably something I needed to do with the request body) but that's easily worked around by just doing a HEAD request in the first place and following redirects until we get to the final download URL which we can pass to grab.

Closes getsolus/solbuild#37