Skip to content

Commit bbbfead

Browse files
committed
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 <themineo@gmail.com>
1 parent 53816ea commit bbbfead

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

musicbrainzngs/musicbrainz.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ def _mb_request(path, method='GET', auth_required=AUTH_NO,
556556
else:
557557
# Explicitly indicate zero content length if no request data
558558
# will be sent (avoids HTTP 411 error).
559-
headers['Content-Length'] = 0
559+
headers['Content-Length'] = '0'
560560

561561
# Convert args from a dictionary to a list of tuples
562562
# so that the ordering of elements is stable for easy

0 commit comments

Comments
 (0)