Skip to content

Commit

Permalink
Merge pull request apache#747 from sergiohgz/http-hook-startwith-http
Browse files Browse the repository at this point in the history
Fix base_url in http hook to always start with http://
  • Loading branch information
mistercrunch committed Dec 10, 2015
2 parents edd0fd3 + 992a855 commit 7a8dbe9
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 7a8dbe9

Please sign in to comment.