From 84a085138f69401bb5787916a530b59935c8dc19 Mon Sep 17 00:00:00 2001 From: David Medina Date: Wed, 16 Nov 2011 01:52:33 +0100 Subject: Fix 411 with PUT request with data as None, requests module didn't add specific header --- github3/api.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'github3/api.py') diff --git a/github3/api.py b/github3/api.py index 1c467ff..a4ee4a9 100644 --- a/github3/api.py +++ b/github3/api.py @@ -72,8 +72,9 @@ class GithubCore(object): def put(self, request, **kwargs): """ PUT request """ - # Content-length: 0 to headers ? - response = self._request('PUT', request, **kwargs) + + response = self._request('PUT', request, + headers={'Content-length': '0'}, **kwargs) assert response.status_code == 204 return response -- cgit v1.2.3-59-g8ed1b