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 <[email protected]>
  • Loading branch information
mineo committed Jun 11, 2017
1 parent 957944d commit 1ccde2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion musicbrainzngs/musicbrainz.py
Original file line number Diff line number Diff line change
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 1ccde2e

Please sign in to comment.