From f2b501ca3549bbc71a7caa0be5abdd2edc2c58a1 Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Fri, 6 Dec 2013 17:09:59 -0800 Subject: [PATCH] python3.3 http.client wants ProxyingRecord.readinto --- warcprox/warcprox.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/warcprox/warcprox.py b/warcprox/warcprox.py index 5e3c14a..c833b5a 100644 --- a/warcprox/warcprox.py +++ b/warcprox/warcprox.py @@ -227,6 +227,11 @@ class ProxyingRecorder(object): self._update(hunk) return hunk + def readinto(self, b): + n = self.fp.readinto(b) + self._update(b[:n]) + return n + def readline(self, size=-1): # XXX depends on implementation details of self.fp.readline(), in # particular that it doesn't call self.fp.read()