marcosmarxm commented on a change in pull request #14701:
URL: https://github.com/apache/airflow/pull/14701#discussion_r594507916



##########
File path: airflow/providers/http/hooks/http.py
##########
@@ -176,15 +181,20 @@ def run_and_check(
         """
         extra_options = extra_options or {}
 
+        request_options = {}
+        if "verify" in extra_options:
+            # Overwrite verify only if it is needed
+            request_options["verify"] = extra_options["verify"]
+
         try:
             response = session.send(
                 prepped_request,
                 stream=extra_options.get("stream", False),
-                verify=extra_options.get("verify", True),
                 proxies=extra_options.get("proxies", {}),
                 cert=extra_options.get("cert"),
                 timeout=extra_options.get("timeout"),
                 allow_redirects=extra_options.get("allow_redirects", True),
+                **request_options,

Review comment:
       The default value in the requests Session library to **verify** is 
`True` and you can change the value in your **hook.run** execution to `False` 
using the `extra_options={"verify": False}`. If you dont sent this parameter 
from Airflow in the `send` function request will assume `True` anyway... right?
   
   
https://requests.readthedocs.io/en/master/_modules/requests/sessions/#Session.send




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to