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

ASF GitHub Bot commented on AIRFLOW-2937:
-----------------------------------------

stale[bot] closed pull request #3783: [AIRFLOW-2937] Support HTTPS in Http 
connection form environment variables
URL: https://github.com/apache/incubator-airflow/pull/3783
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/hooks/http_hook.py b/airflow/hooks/http_hook.py
index c449fe0c15..359e588a96 100644
--- a/airflow/hooks/http_hook.py
+++ b/airflow/hooks/http_hook.py
@@ -62,7 +62,7 @@ def get_conn(self, headers=None):
             self.base_url = conn.host
         else:
             # schema defaults to HTTP
-            schema = conn.schema if conn.schema else "http"
+            schema = conn.conn_type if conn.conn_type else conn.schema if 
conn.schema else "http"
             self.base_url = schema + "://" + conn.host
 
         if conn.port:


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> HttpHook doesn't respect the URI scheme when the connection is defined via 
> Environment Variable
> -----------------------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-2937
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2937
>             Project: Apache Airflow
>          Issue Type: Bug
>            Reporter: Matt Chapman
>            Assignee: Matt Chapman
>            Priority: Major
>
> AIRFLOW-645 almost solved this, but not quite.
> I believe AIRFLOW-2841 is another misguided attempt at solving this problem, 
> and shows that this is an issue for other users.
> The core issue is that the HttpHook confusingly mixes up the ideas of 'URI 
> scheme' and 'Database schema.' 
> I'm submitting a patch that fixes the issue while maintaining backward 
> compatibility, but does not solve the core confusion, which I suggest should 
> be addressed in the next major release.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to