diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c0076924..8e78bd4a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# v2.0.0b2 +- Bugfix: support RFC6902 'json-patch' operations #187 + # v1.0.1 - Bugfix: urllib3 1.21 fails tests, Excluding version 1.21 from dependencies #197 diff --git a/kubernetes/client/rest.py b/kubernetes/client/rest.py index 826d4467b..8b3a5dabd 100644 --- a/kubernetes/client/rest.py +++ b/kubernetes/client/rest.py @@ -154,8 +154,8 @@ def request(self, method, url, query_params=None, headers=None, if query_params: url += '?' + urlencode(query_params) if headers['Content-Type'] == 'application/json-patch+json': - headers[ - 'Content-Type'] = 'application/strategic-merge-patch+json' + if not isinstance(body, list): + headers['Content-Type'] = 'application/strategic-merge-patch+json' request_body = None if body: request_body = json.dumps(body)