From 261d5d562802a083b6789f0f8594761668153d9b Mon Sep 17 00:00:00 2001 From: Geoff Brown Date: Mon, 13 Jan 2020 22:50:22 +0000 Subject: [PATCH] Bug 1608901 - Add referer to http headers when querying ActiveData from test-info; r=egao Simply add referer to ActiveData queries. Differential Revision: https://phabricator.services.mozilla.com/D59779 --HG-- extra : moz-landing-system : lando --- testing/testinfo.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testing/testinfo.py b/testing/testinfo.py index 5eb57b30c538..f0e4ca5c7451 100644 --- a/testing/testinfo.py +++ b/testing/testinfo.py @@ -23,6 +23,7 @@ from mozbuild.base import MozbuildObject, MachCommandConditions as conditions ACTIVEDATA_RECORD_LIMIT = 10000 MAX_ACTIVEDATA_CONCURRENCY = 5 MAX_ACTIVEDATA_RETRIES = 5 +REFERER = 'https://wiki.developer.mozilla.org/en-US/docs/Mozilla/Test-Info' class TestInfo(object): @@ -45,6 +46,7 @@ class TestInfo(object): self.log_verbose(json.dumps(query)) response = requests.post("http://activedata.allizom.org/query", data=json.dumps(query), + headers={'referer': REFERER}, stream=True) end_time = datetime.datetime.now() self.total_activedata_seconds += (end_time - start_time).total_seconds()