mirror of https://github.com/ansible/ansible.git
Set default user-agent for module_utils.urls fetch_url (#27095)
The HTTP User-Agent "ansible-httpget" is already kind of the default, it being the default value provided by the `url_argument_spec` helper method. Yet, it may not be practical for all modules to get their argument_spec that way. Without a default User-Agent we fall back on the library User-Agent. That being something like "Python-urllib/2.7". While I'm no big fan of web servers making decisions based on the provided User-Agent I still think that part of being a well-behaved HTTP client is to provide an informative User-Agent. Not to mention that it's a good thing for Ansible to behave consistently. Indirectly fixes #26239pull/27147/head
parent
7c65272e2d
commit
063f5d0ca8
Loading…
Reference in New Issue