ad-m commented on a change in pull request #7682: [AIRFLOW-7031] Airflow WinRM 
endpoint is hardcoded to HTTP
URL: https://github.com/apache/airflow/pull/7682#discussion_r392539986
 
 

 ##########
 File path: airflow/providers/microsoft/winrm/hooks/winrm.py
 ##########
 @@ -199,7 +199,7 @@ def get_conn(self):
 
         # If endpoint is not set, then build a standard wsman endpoint from 
host and port.
         if not self.endpoint:
-            self.endpoint = 'http://{0}:{1}/wsman'.format(self.remote_host, 
self.remote_port)
+            self.endpoint = '{0}://{1}:{2}/wsman'.format(self.service.lower(), 
self.remote_host, self.remote_port)
 
 Review comment:
   ```suggestion
               self.endpoint = '{0}://{1}:{2}/wsman'.format(self.service, 
self.remote_host, self.remote_port)
   ```
   Schema section of URL are case-insensitive and implementation should accept 
uppercase letters as equivalent to lowercase in scheme names (e.g., allow 
"HTTP" as well as "http"). See RFC 3986 for details.
   
   

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to