611fed05f4
* [forwardport] release 3.11: update all the dependencies (#636) This diff forward ports e291e436b3c332300f5567796f9c48bb9bc1e652. * chore: use go1.17.4 everywhere Part of https://github.com/ooni/probe/issues/1843 * chore: update to the latest ooni/oohttp Part of https://github.com/ooni/probe/issues/1843 * chore: update the dependencies Note: I did an update and not an upgrade (i.e., I didn't check whether we have next-major-versions of dependencies). Part of https://github.com/ooni/probe/issues/1843 * chore: update the user-agent we use Part of https://github.com/ooni/probe/issues/1843 * chore: update ooni/oohttp and ooni/probe-assets Part of https://github.com/ooni/probe/issues/1843 * chore: run go generate again Part of https://github.com/ooni/probe/issues/1843 * fix(jafar): skip currently broken test Created issue for it here: https://github.com/ooni/probe/issues/1913
17 lines
635 B
Go
17 lines
635 B
Go
// Package httpheader contains code to set common HTTP headers.
|
|
package httpheader
|
|
|
|
// UserAgent returns the User-Agent header used for measuring.
|
|
func UserAgent() string {
|
|
// 15.1% as of Dec 06, 2021 according to https://techblog.willshouse.com/2012/01/03/most-common-user-agents/
|
|
const ua = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36"
|
|
return ua
|
|
}
|
|
|
|
// CLIUserAgent returns the User-Agent used when we want to
|
|
// pretent to be a command line HTTP client.
|
|
func CLIUserAgent() string {
|
|
// here we always put the latest version of cURL.
|
|
return "curl/7.79.1"
|
|
}
|