From 4897e3974e82d7bcc0fa68b0dba82cd0238fa29f Mon Sep 17 00:00:00 2001 From: Matthew Johnson Date: Wed, 13 Dec 2017 14:14:59 -0800 Subject: [PATCH] Follow redirects from license server Signed-off-by: Matthew Johnson --- autospec/license.py | 1 + tests/test_license.py | 1 + 2 files changed, 2 insertions(+) diff --git a/autospec/license.py b/autospec/license.py index 5874cc9..67924c91 100644 --- a/autospec/license.py +++ b/autospec/license.py @@ -72,6 +72,7 @@ def license_from_copying_hash(copying): c.setopt(c.URL, config.license_fetch) c.setopt(c.WRITEDATA, buffer) c.setopt(c.POSTFIELDS, data) + c.setopt(c.FOLLOWLOCATION, 1) try: c.perform() except Exception as excep: diff --git a/tests/test_license.py b/tests/test_license.py index 5bd9cb0..c37f4cc 100644 --- a/tests/test_license.py +++ b/tests/test_license.py @@ -117,6 +117,7 @@ class TestLicense(unittest.TestCase): URL = None WRITEDATA = None POSTFIELDS = None + FOLLOWLOCATION = 0 def setopt(_, __, ___): pass