airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-645) HttpHook ignores https
Date Sun, 21 May 2017 18:29:05 GMT

    [ https://issues.apache.org/jira/browse/AIRFLOW-645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16018940#comment-16018940
] 

ASF subversion and git services commented on AIRFLOW-645:
---------------------------------------------------------

Commit fd381a11e98b60e1ff3d75aea07fbc36d0bc5d38 in incubator-airflow's branch refs/heads/master
from [~jjz]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=fd381a1 ]

[AIRFLOW-645] Support HTTPS connections in HttpHook

Consider the connection schema when building the
URL in HttpHook. This
allows making HTTPS requests. If a schema is not
specified in the
connection, default to HTTP. If the connection
host contains a schema,
use it instead to maintain backwards
compatibility.

Closes #2311 from johnzeringue/AIRFLOW-645


> 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
>             Fix For: 1.9.0
>
>
> 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)

Mime
View raw message