Eric Chang created AIRFLOW-3162:
-----------------------------------
Summary: HttpHook fails to parse URL when port is specified
Key: AIRFLOW-3162
URL: https://issues.apache.org/jira/browse/AIRFLOW-3162
Project: Apache Airflow
Issue Type: Bug
Reporter: Eric Chang
Assignee: Eric Chang
This PR introduced a regression on HttpHook.get() where if a port is specified
on airflow.models.Connection.port and the provided endpoint has no leading
slash, the URL will fail to parse.
With the connection:
{{airflow.models.Connection(}}
{{ conn_id='test_conn',}}
{{ conn_type='http',}}
{{ host='test.com',}}
{{ port=1234}}
{{)}}
{{>>> hook = HttpHook(method='GET', http_conn_id='test_conn')}}
{{>>> hook.get(endpoint='some/endpoint')}}
{{----------------------------------------------------------------------}}
{{Traceback (most recent call last):}}
{{InvalidURL: Failed to parse: test.com:1234some/endpoint}}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)