summary refs log tree commit diff
path: root/pkgs/development/python-modules/boto
diff options
context:
space:
mode:
authorBenjamin Staffin <ben@folsomlabs.com>2015-03-06 20:45:02 -0800
committerBenjamin Staffin <ben@folsomlabs.com>2015-03-07 14:06:08 -0800
commit5113a065d7340f8c2650566bf1400e1863c539e2 (patch)
tree9a6662874235e83d2fb8cd083628cb38cceafb84 /pkgs/development/python-modules/boto
parent0fd3db4ba1d1d6d3a6108970ef96b24853593414 (diff)
downloadnixpkgs-5113a065d7340f8c2650566bf1400e1863c539e2.tar
nixpkgs-5113a065d7340f8c2650566bf1400e1863c539e2.tar.gz
nixpkgs-5113a065d7340f8c2650566bf1400e1863c539e2.tar.bz2
nixpkgs-5113a065d7340f8c2650566bf1400e1863c539e2.tar.lz
nixpkgs-5113a065d7340f8c2650566bf1400e1863c539e2.tar.xz
nixpkgs-5113a065d7340f8c2650566bf1400e1863c539e2.tar.zst
nixpkgs-5113a065d7340f8c2650566bf1400e1863c539e2.zip
boto: Apply patch needed to fix docker-registry
This makes docker-registry work when backed by S3. It's the same patch
applied in the docker upstream container image.

Backported from boto/boto#2932
Diffstat (limited to 'pkgs/development/python-modules/boto')
-rw-r--r--pkgs/development/python-modules/boto/content-length-str.patch16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/boto/content-length-str.patch b/pkgs/development/python-modules/boto/content-length-str.patch
new file mode 100644
index 00000000000..7895e223c6b
--- /dev/null
+++ b/pkgs/development/python-modules/boto/content-length-str.patch
@@ -0,0 +1,16 @@
+Cherry-picked from https://github.com/boto/boto/pull/2932
+
+This fix is required for things like docker-registry to interact with S3. Will
+be obsolete after the next boto release (> 2.36.0)
+
+--- a/boto/connection.py
++++ b/boto/connection.py
+@@ -381,7 +381,7 @@ class HTTPRequest(object):
+         if 'Content-Length' not in self.headers:
+             if 'Transfer-Encoding' not in self.headers or \
+                     self.headers['Transfer-Encoding'] != 'chunked':
+-                self.headers['Content-Length'] = len(self.body)
++                self.headers['Content-Length'] = str(len(self.body))
+
+
+ class HTTPResponse(http_client.HTTPResponse):