From b91dc709bfc20b4219446e4e6c0d95dd0c2435bd Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Fri, 14 Jun 2019 21:00:40 +0200 Subject: [PATCH] Clear implementation --- certbot-ci/certbot_integration_tests/utils/proxy.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/certbot-ci/certbot_integration_tests/utils/proxy.py b/certbot-ci/certbot_integration_tests/utils/proxy.py index bc5e57000..69248c771 100644 --- a/certbot-ci/certbot_integration_tests/utils/proxy.py +++ b/certbot-ci/certbot_integration_tests/utils/proxy.py @@ -4,9 +4,9 @@ import sys import re import requests -from six.moves import BaseHTTPServer, socketserver +from six.moves import BaseHTTPServer -from certbot_integration_tests import GracefulTCPServer +from certbot_integration_tests.utils.misc import GracefulTCPServer def _create_proxy(mapping): @@ -14,7 +14,7 @@ def _create_proxy(mapping): def do_GET(self): headers = {key.lower(): value for key, value in self.headers.items()} backend = [backend for pattern, backend in mapping.items() - if re.matches(pattern, host)][0] + if re.match(pattern, headers['host'])][0] response = requests.get(backend + self.path, headers=headers) self.send_response(response.status_code)