diff --git a/airflow/hooks/http_hook.py b/airflow/hooks/http_hook.py index d2a954454e83f..0c0db1cad1bf5 100644 --- a/airflow/hooks/http_hook.py +++ b/airflow/hooks/http_hook.py @@ -24,6 +24,8 @@ def get_conn(self, headers): conn = self.get_connection(self.http_conn_id) session = requests.Session() self.base_url = conn.host + if not self.base_url.startswith('http'): + self.base_url = 'http://' + self.base_url if conn.port: self.base_url = self.base_url + ":" + str(conn.port) + "/"