Skip to content

Commit

Permalink
Fix base_url in http hook to always start with http://
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Herrera Guzmán committed Dec 10, 2015
1 parent edd0fd3 commit 992a855
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions airflow/hooks/http_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -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) + "/"
Expand Down

0 comments on commit 992a855

Please sign in to comment.