1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/plugins/modules/packaging/language
patchback[bot] 303000c1a1
Expose unredirected_headers on maven_artifact (#4812) (#4994)
* Expose unredirected_headers to module

In some cases, when the initial request returns a redirect and we want
to follow it to get the artifact, we might not want to include certain
headers in the redirection request. Specially headers like
Authorization and Cookies.
Or perhaps the redirect server returns a 400 because it included some
unexpected headers.
Fetch url already supports this feature, but it was being shadowed by
maven_artifact. In here we just expose it.

* Fix Linting errors

* Applied Comments

 - Specified version added
 - Changed description of unredirected_headers

* Check for ansible version

If it's 2.11 or older, we ignore unredirected_headers, otherwise we use
it, as fetch_url has them

* Applied comments

- Removed duplicated code in the call of fetch_url. Used kwargs instead
- Added check if unredirected_params is not empty and the fetch_url
  function does not support it
- Changed function that checks for ansible version
- Removed unused import

* Remove 2.11 breaking change

Made default only for ansible-core version 2.12 and above, but for keep
it empty for ansible-core version 2.11 and below.
Also include the following changes:
  - change doc to use C() on the function description
  - changed doc to use ansible-core instead of Ansible

* Changes in description for readability

* Add changelog fragment

* Change description changelog fragment

(cherry picked from commit a2677fd051)

Co-authored-by: Raul Gabriel Verdi <95469166+raul-verdi@users.noreply.github.com>
2022-07-24 12:29:11 +02:00
..
ansible_galaxy_install.py Misc. typo fixes (#4940) (#4942) 2022-07-11 22:18:22 +02:00
bower.py Tidy up validate-modules ignores for packaging modules (#1289) 2020-11-13 12:41:11 +00:00
bundler.py Tidy up sanity checks (2021/Batch 3 - who's counting) (#1885) 2021-02-26 11:37:23 +01:00
cargo.py Fix detection of installed cargo packages with hyphens in name (#4052) 2022-01-18 12:12:48 +01:00
composer.py Misc. typo fixes (#4940) (#4942) 2022-07-11 22:18:22 +02:00
cpanm.py Multiple modules using ModuleHelper (#4674) (#4713) 2022-05-23 07:32:54 +02:00
easy_install.py Tidy up validate-modules ignores for packaging modules (#1289) 2020-11-13 12:41:11 +00:00
gem.py Deprecate norc's default. (#4517) 2022-04-26 11:45:43 +02:00
maven_artifact.py Expose unredirected_headers on maven_artifact (#4812) (#4994) 2022-07-24 12:29:11 +02:00
npm.py npm: add support for production flag when using ci (#4299) 2022-03-10 21:37:44 +01:00
pear.py Replace ansible.module_utils._text by ansible.module_utils.common.text.converters (#2877) 2021-06-26 23:59:11 +02:00
pip_package_info.py Fix various module docs. (#4887) (#4888) 2022-06-22 22:54:08 +02:00
pipx.py Multiple modules using ModuleHelper (#4674) (#4713) 2022-05-23 07:32:54 +02:00
yarn.py Remove unsupported and unnecessary --no-emoji option (#4662) 2022-05-16 08:45:12 +02:00