Win get url auth 2.5 (#40642)

* Fixed WebRequest init (#40641)


(cherry picked from commit 4fbdc1a497)

* Added changelog fragment
pull/40656/head
Jordan Borean 7 years ago committed by GitHub
parent fac5a14ded
commit 12ac23bad3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- win_get_url - fixed issue when authenticating when force=yes https://github.com/ansible/ansible/pull/40641

@ -53,9 +53,9 @@ Function CheckModified-File($url, $dest, $headers, $credentials, $timeout, $use_
if ($credentials) {
if ($force_basic_auth) {
$extWebClient.Headers.Add("Authorization","Basic $credentials")
$webRequest.Headers.Add("Authorization", "Basic $credentials")
} else {
$extWebClient.Credentials = $credentials
$webRequest.Credentials = $credentials
}
}

Loading…
Cancel
Save