Skip to content

Commit

Permalink
Stringify the Content-Length header
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mineo committed Dec 10, 2016
1 parent 67d4dd9 commit b8b9796
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion musicbrainzngs/musicbrainz.py
Expand Up @@ -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
Expand Down

0 comments on commit b8b9796

Please sign in to comment.