keystoneauth/keystoneauth1
Samuel de Medeiros Queiroz 13054e8b6d 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:19:10 -05:00
..
access Use positional library instead of our own copy 2016-01-25 09:31:48 +11:00
exceptions HTTPError should contain 'retry_after' parameter 2016-01-19 15:24:55 +09:00
extras Mark password/secret options as secret 2016-01-15 22:43:38 +00:00
fixture Default serialize_with to json 2016-10-13 16:22:44 -05:00
hacking Move to the keystoneauth1 namespace 2015-06-25 16:48:54 -07:00
identity Use positional library instead of our own copy 2016-01-25 09:31:48 +11:00
loading Swap the order of username deprecation 2016-04-18 11:29:08 +02:00
tests Only log application/json content type 2017-01-10 22:19:10 -05:00
__init__.py Provide a RFC 7231 compliant user agent string 2015-12-15 16:45:17 -06:00
_utils.py Use positional library instead of our own copy 2016-01-25 09:31:48 +11:00
adapter.py Use positional library instead of our own copy 2016-01-25 09:31:48 +11:00
discover.py Use positional library instead of our own copy 2016-01-25 09:31:48 +11:00
plugin.py Docstring corrections 2015-12-17 17:09:58 -06:00
session.py Only log application/json content type 2017-01-10 22:19:10 -05:00
token_endpoint.py Split plugin loading 2015-08-06 10:07:51 +10:00