summaryrefslogtreecommitdiff
path: root/releasenotes
diff options
context:
space:
mode:
authorTobias Diaz <tobias.deb@gmail.com>2016-08-23 17:13:24 +0200
committerSamuel de Medeiros Queiroz <samueldmq@gmail.com>2017-01-05 10:19:25 -0300
commit3e56e0d7e5e1a76d806a3bc1f6d5ef9070f95771 (patch)
treecf73b3ba11fab18e8d64d220366282e969f3a062 /releasenotes
parent39373aa40b085c3277fe393de0f638f12ac16d53 (diff)
downloadpython-keystoneclient-3e56e0d7e5e1a76d806a3bc1f6d5ef9070f95771.tar.gz
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. This is a sort of backport of the fix for keystoneauth sessions, see I93b6fff73368c4f58bdebf8566c4948b50980cee Co-Authored-By: Samuel de Medeiros Queiroz <samueldmq@gmail.com> Closes-bug: 1616105 Change-Id: I8f43eee3a0b35041c6cf672e476f8151cf2f8d14
Diffstat (limited to 'releasenotes')
-rw-r--r--releasenotes/notes/bug-1616105-cc8b85eb056e99e2.yaml8
1 files changed, 8 insertions, 0 deletions
diff --git a/releasenotes/notes/bug-1616105-cc8b85eb056e99e2.yaml b/releasenotes/notes/bug-1616105-cc8b85eb056e99e2.yaml
new file mode 100644
index 0000000..91529c6
--- /dev/null
+++ b/releasenotes/notes/bug-1616105-cc8b85eb056e99e2.yaml
@@ -0,0 +1,8 @@
+---
+fixes:
+ - >
+ [`bug 1616105 <https://bugs.launchpad.net/keystoneauth/+bug/1616105>`_]
+ Only log the response body when the ``Content-Type`` header is set to
+ ``application/json`` or ``application/text``. This avoids logging large
+ binary objects (such as images). Other ``Content-Type`` will not be
+ logged.