New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win_uri: fixes #35487
win_uri: fixes #35487
Conversation
a17461f
to
d91e154
Compare
d91e154
to
a807ccc
Compare
Content-Length { $client.ContentLength = $header.Value } | ||
Content-Type { $client.ContentType = $header.Value } | ||
Expect { $client.Expect = $header.Value } | ||
Date { $client.Date = $hader.Value } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo $hader.Value
@@ -0,0 +1,3 @@ | |||
--- | |||
test_uri_path: C:\ansible\win_uri | |||
httpbin_host: httpbin.org |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I was told we didn't want to do test against Internet infrastructure, that's why we have this long-standing issue open regarding having access from the Windows VM's to the httptester infrastructure that Docker images are using.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't, this is a wait and see thing. If we come across any recurring issues we will disable the tests in CI but until we have added the code to forward the httptester container ports to the Windows host this is better than nothing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me. Although enabling httptester wasn't supposed to be so hard either ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are getting close, there is a PR out there to install the SSH server on the Windows hosts and @mattclay is looking into creating a remote port forwarder to the Windows host with this SSH server for certain tests. We can do all this manually but the trick is getting it to work in CI and be stable.
Once that is in, it will be as simple as changing this variable to be localhost:port
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch that sounds messy :-\ And wouldn't that be tricky to run from your laptop ?
use_basic_parsing: | ||
description: | ||
- As of Ansible 2.5, this option is no longer valid and cannot be changed from C(yes). | ||
- This will be removed in Ansible 2.7 | ||
- This module relies upon 'Invoke-WebRequest', which by default uses the Internet Explorer Engine to parse a webpage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L67-L69 can be removed from the documentation.
Looks good to me now. |
I've made the changes requested by the review and will merge in as the community freeze will be upon us. |
SUMMARY
Fix various aspects of the win_uri module.
Fixes #35413 - no support for TLS 1.1 and 1.2
Fixes #34698 - no json return object
Fixes #32037 - set both string and dict for body (json)
Fixes #31981 - cannot set headers
Fixes #31166 - not validating non 2xx error codes
Also fixes (no issues currently raised for it)
There are some breaking changes here but I thought it would be good to rip them out considering it is a preview module. The stuff I have removed are;
Invoke-WebRequest
to the .netHttpWebRequest
in order to support redirection properly50
to reflect the default ofHttpWebRequest
use_basic_parsing
does nothing anymore so a short warning is set saying it is no longer used and will be removedUnfortunately the scope of changes means I won't be able to backport it.
ISSUE TYPE
COMPONENT NAME
win_uri
ANSIBLE VERSION