From b8b9796f897edfa5bf3b02f350a4378a2b8c97de Mon Sep 17 00:00:00 2001 From: Wieland Hoffmann Date: Sat, 10 Dec 2016 18:52:20 +0100 Subject: [PATCH] Stringify the Content-Length header Recent versions of requests no longer accept integer header values. See https://github.com/kennethreitz/requests/issues/3477 Signed-off-by: Wieland Hoffmann --- musicbrainzngs/musicbrainz.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/musicbrainzngs/musicbrainz.py b/musicbrainzngs/musicbrainz.py index 772c1f6..ce2ea41 100644 --- a/musicbrainzngs/musicbrainz.py +++ b/musicbrainzngs/musicbrainz.py @@ -549,7 +549,7 @@ def _mb_request(path, method='GET', auth_required=AUTH_NO, else: # Explicitly indicate zero content length if no request data # will be sent (avoids HTTP 411 error). - headers['Content-Length'] = 0 + headers['Content-Length'] = '0' # Convert args from a dictionary to a list of tuples # so that the ordering of elements is stable for easy