Win get url auth 2.5 (#40642)

* Fixed WebRequest init (#40641)


(cherry picked from commit 4fbdc1a497)

* Added changelog fragment
This commit is contained in:
Jordan Borean 2018-05-24 14:42:39 +10:00 committed by GitHub
parent fac5a14ded
commit 12ac23bad3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

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

View file

@ -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
}
}