adobe / brackets.io

brackets.io website
111 stars 80 forks source link

Improve UA sniffing for Linux64 for download.brackets.io and brackets.io #29

Closed DavidBruant closed 10 years ago

marcelgerber commented 10 years ago

This doesn't really work on Chrome for Android in http://download.brackets.io too. My UA string:

Mozilla/5.0 (Linux; Android 4.1.2; GT-I8190 Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.92 Mobile Safari/537.36

Detected: LINUX64 (why the hell x64?!)

DavidBruant commented 10 years ago

Does Bracket work on Android? Interesting. what's your navigator.appVersion? The website tests for that too. To be honest, I don't really know why, so I tried to make a conservative change.

LINUX64 (why the hell x64?!)

Why not? Mobile phones can be 64bits too, no?

Are you reporting a different bug?

marcelgerber commented 10 years ago

No, it doesn't yet work on Android ;) My navigator.appVersion is

Version info: 5.0 (Linux; Android 4.1.2; GT-I8190 Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.92 Mobile Safari/537.36

And no, Android doesn't yet support x64.

marcelgerber commented 10 years ago

And yes, this is another bug as it repros with the current website. But it is somehow related to this PR.

larz0 commented 10 years ago

Tagging @adrocknaphobia :)

adrocknaphobia commented 10 years ago

Manually added the check for userAgent x86_64.

@DavidBruant Please confirm is detecting Linux 64 properly.

DavidBruant commented 10 years ago

@adrocknaphobia Looks good to me. Should I close this PR?

adrocknaphobia commented 10 years ago

@DavidBruant Thanks for the quick verification.

DavidBruant commented 10 years ago

@adrocknaphobia My PR also contained a fix for download.brakets.io I think your fix doesn't contain it. Relevant commit https://github.com/DavidBruant/brackets.io/commit/8d0873ef390a61ceecaf66f41b18becbf49efab7

adrocknaphobia commented 10 years ago

@DavidBruant Thanks. I think we can close this one.

Right now download.brackets.io is doing UA sniffing on the server side. It's an old page that we're in the process of updating to the new design. When we update w/ the new, I think we'll drop UA sniffing all together (and have download buttons for all the OSes). The idea being we can direct to http://download.brackets.io for any OS we can't determine.