Sublime Forum

Arch Linux repo is sensitive to User-Agent

#1

On Arch Linux, using the official repository given here:

https://www.sublimemerge.com/docs/linux_repositories#pacman

I cannot install sublime merge, and this probably is caused by the sublime server is sensitive to the User-Agent header, as confirmed by:

curl https://download.sublimetext.com/arch/stable/x86_64/sublime-merge-1065-1-x86_64.pkg.tar.xz

This will fetch a HTML page with status 302, not what we wanted. but:

curl --user-agent 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36' https://download.sublimetext.com/sublime-merge-1065-1-x86_64.pkg.tar.xz > /tmp/sublime-merge-1065-1-x86_64.pkg.tar.xz

will correctly fetch the package.

PS. Arch Linux uses curl to download the package by default.

0 Likes

#2

You are passing two different URLs. I’m fairly sure we don’t have nginx configured to change the response via user agent.

0 Likes

#3

Thanks and sorry for wasting your time.

Turns out my pacman’s XferCommand is not following redirect.

0 Likes