[aur-general] curl download in makepkg doesn't work for contradictory reasons
Hello, the curl download for package mma fails with the following error curl: (22) The requested URL returned error: 406 Not Acceptable This error can be removed by adding '--user-agent "Mozilla/4.0"' to the DLAGENTS from /etc/makepkg.conf. But with this additional option, the download from sourceforge fails. How can I solve this contradiction? Is it possible to configure package specific download options in the PKGBUILD? This are the successful download comands (I have left out the '-C -'): # works only with agent /usr/bin/curl -fL --retry 3 --retry-delay 3 \ --user-agent "Mozilla/4.0" \ -O http://www.mellowood.ca/mma/mma-bin-12.10.tar.gz # works only without agent /usr/bin/curl -fL --retry 3 --retry-delay 3 \ -O http://downloads.sourceforge.net/zdfmediathk/MediathekView_3.2.1.zip Best regards Uwe Koloska
On Sun, Mar 31, 2013 at 5:07 PM, Uwe Koloska <kolewu@koloro.de> wrote:
Hello,
the curl download for package mma fails with the following error curl: (22) The requested URL returned error: 406 Not Acceptable
This is because scumbag server admins block requests with the curl user agent. It's a server problem, not a makepkg problem.
This error can be removed by adding '--user-agent "Mozilla/4.0"' to the DLAGENTS from /etc/makepkg.conf.
But with this additional option, the download from sourceforge fails.
How can I solve this contradiction? Is it possible to configure package specific download options in the PKGBUILD?
Sure. You're free to redefine DLAGENTS in a PKGBUILD just as they are in /etc/makepkg.conf.
This are the successful download comands (I have left out the '-C -'):
# works only with agent /usr/bin/curl -fL --retry 3 --retry-delay 3 \ --user-agent "Mozilla/4.0" \ -O http://www.mellowood.ca/mma/mma-bin-12.10.tar.gz
# works only without agent /usr/bin/curl -fL --retry 3 --retry-delay 3 \ -O http://downloads.sourceforge.net/zdfmediathk/MediathekView_3.2.1.zip
Best regards Uwe Koloska
Hello Dave, thanks for the quick answer! Am 31.03.2013 23:11, schrieb Dave Reisner:
On Sun, Mar 31, 2013 at 5:07 PM, Uwe Koloska <kolewu@koloro.de> wrote:
the curl download for package mma fails with the following error curl: (22) The requested URL returned error: 406 Not Acceptable
This is because scumbag server admins block requests with the curl user agent. It's a server problem, not a makepkg problem.
Do you know the reason, why curl *with* mozilla user-agent doesn't work with sourceforge? It looks like there is a second redirection with the curl user-agent. Uwe
On Sun, Mar 31, 2013 at 6:59 PM, Uwe Koloska <kolewu@koloro.de> wrote:
Hello Dave,
thanks for the quick answer!
Am 31.03.2013 23:11, schrieb Dave Reisner:
On Sun, Mar 31, 2013 at 5:07 PM, Uwe Koloska <kolewu@koloro.de> wrote:
the curl download for package mma fails with the following error curl: (22) The requested URL returned error: 406 Not Acceptable
This is because scumbag server admins block requests with the curl user agent. It's a server problem, not a makepkg problem.
Do you know the reason, why curl *with* mozilla user-agent doesn't work with sourceforge? It looks like there is a second redirection with the curl user-agent.
Seems like more server shenanagins based on user-agent. The page you're redirected to with the Mozilla UA is just advertisements stuffed into iframes with a time delayed download.
participants (2)
-
Dave Reisner
-
Uwe Koloska