Matt Mulsow 4a0ac4583b User-agent header shouldn't start with a space
If the application name, sys.argv[0], is an empty string, like when
called from the Ansible os_network module, then keystoneauth (with
the new requests 2.11.0) will raise an exception saying:

Invalid return character or leading space in header: User-Agent

This comes from keystoneauth trying to prepend the empty module
name to the default user agent, which leads to it sending a
User-Agent header that starts with a blank space. This was fine
until the new requests 2.11.0 was released which errors if header
values start with a leading space.

With this change, if sys.argv[0] is an empty string we'll just use
the DEFAULT_USER_AGENT and not try to prepend a calling module.

Closes-Bug: #1611426

Change-Id: I56d3e352dce7628add0479b3333a880700844ebc
Signed-off-by: Matt Mulsow <mamulsow@us.ibm.com>
2016-08-09 10:57:10 -05:00
2015-12-09 11:46:00 +11:00
2015-11-29 20:05:16 -05:00
2014-05-07 12:12:43 -07:00
2013-05-17 14:43:31 -07:00
2015-12-04 14:18:27 -08:00
2015-09-17 12:12:42 +00:00

keystoneauth

Latest Version

Downloads

This package contains tools for authenticating to an OpenStack-based cloud. These tools include:

  • Authentication plugins (password, token, and federation based)
  • Discovery mechanisms to determine API version support
  • A session that is used to maintain client settings across requests (based on the requests Python library)

Further information:

Description
OpenStack Identity Authentication Library
Readme 12 MiB
Languages
Python 100%