Win get url auth 2.5 (#40642)
* Fixed WebRequest init (#40641)
(cherry picked from commit 4fbdc1a497
)
* Added changelog fragment
This commit is contained in:
parent
fac5a14ded
commit
12ac23bad3
2 changed files with 4 additions and 2 deletions
2
changelogs/fragments/win_get_url-fix-auth-issue.yaml
Normal file
2
changelogs/fragments/win_get_url-fix-auth-issue.yaml
Normal file
|
@ -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…
Reference in a new issue