[
https://issues.apache.org/jira/browse/AIRFLOW-645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16017541#comment-16017541
]
John Zeringue commented on AIRFLOW-645:
---------------------------------------
I've taken a stab at this
[here|https://github.com/apache/incubator-airflow/pull/2311]. It's not as
straightforward as you'd like, because it seems like the schema has been
encoded in the host historically.
> HttpHook ignores https
> ----------------------
>
> Key: AIRFLOW-645
> URL: https://issues.apache.org/jira/browse/AIRFLOW-645
> Project: Apache Airflow
> Issue Type: Bug
> Components: hooks
> Affects Versions: Airflow 2.0, Airflow 1.7.1
> Reporter: Ryan Morlok
>
> When loading an https connection from an environment variable, HttpHook
> leverages BaseHook's get_connection(...) method which will load the string
> from the environment variable. It will then parse the URI.
> HttpHook will then use the base_url as the connection's host, which always
> strips off the protocol. It does a useless check to see if the bsae_url
> starts with http, and since it doesn't it always appends http://, losing the
> https.
> I think
> self.base_url = conn.host
> in http_hook.py should be updated to:
> self.base_url = conn.conn_type + conn.host
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)