keystoneauth/keystoneauth1
Samuel de Medeiros Queiroz 5efe19ff7f Only log application/json content type
This is a combination of 2 commits. The first commit's
message is:

Prevent MemoryError when logging response bodies

Response bodies are loaded into memory prior to
being logged.

Loading huge response bodies may result in a
MemoryError.

This patch proposes that only JSON and TEXT
responses be logged, i.e when the Content-Type
header is application/json or application/text.

Responses that do not include or have a different
Content-Type header will have their body omitted.

Closes-bug: 1616105

Change-Id: I93b6fff73368c4f58bdebf8566c4948b50980cee
(cherry picked from commit f345559a06)

This is the 2nd commit message:

Only log application/json in session to start

When whitelisting content types to debug print from session we chose
application/json and application/text. application/text is not a real
mime type, text is typically text/plain.

Rather than guess at mime types only print application/json to start
with, but make it easy for additional types to be added later.

Change-Id: Ica5fee076cdab8b1d5167161d28af7313fad9477
Related-Bug: 1616105
(cherry-picked from: d73fd3ee84)
2017-01-10 22:15:44 -05:00
..
access Add is_domain to keystoneauth token 2016-05-18 21:56:36 -03:00
exceptions oidc: deprecate grant_type argument 2016-07-14 11:08:29 +02:00
extras Correctly report available for ADFS plugin 2016-07-30 23:53:13 -05:00
fixture Add tests for YamlJsonSerializer 2016-08-04 11:15:51 -05:00
hacking Move to the keystoneauth1 namespace 2015-06-25 16:48:54 -07:00
identity get_endpoint should return None when no version found 2016-08-25 13:49:35 +10:00
loading Merge "Add prompt parameter to Opt" 2016-07-22 22:24:30 +00:00
tests Only log application/json content type 2017-01-10 22:15:44 -05:00
__init__.py Provide a RFC 7231 compliant user agent string 2015-12-15 16:45:17 -06:00
_utils.py Disables TCP_KEEPCNT when using Windows Subsystem for Linux 2016-08-23 03:36:45 +00:00
adapter.py Add additional_headers to session and adapter 2016-07-13 17:09:46 +10:00
discover.py Removing tox ignore D401 and make keystoneauth compliant 2016-04-13 18:46:05 +00:00
plugin.py Removing tox ignore D400. 2016-04-18 21:20:51 +00:00
session.py Only log application/json content type 2017-01-10 22:15:44 -05:00
token_endpoint.py Adding authentication compatibility for OpenStackClient 2016-03-07 23:38:22 +00:00