Applying fixes to Https from Windows team to mono

This should fix the issue.
V1 ID: D-16740