Skip to content

Commit 3166f70

Browse files
committed
Correctly set default value for headers.get() call (fixes #237)
1 parent b490140 commit 3166f70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

couchdb/http.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ def _request(self, method, path=None, body=None, headers=None, **params):
554554
def _request_json(self, method, path=None, body=None, headers=None, **params):
555555
status, headers, data = self._request(method, path, body=body,
556556
headers=headers, **params)
557-
if 'application/json' in headers.get('content-type'):
557+
if 'application/json' in headers.get('content-type', ''):
558558
data = json.decode(data.read().decode('utf-8'))
559559
return status, headers, data
560560

0 commit comments

Comments
 (0)