The code in HTTP(httplib.HTTP):getreply is out of date with changes (a long time ago) to the Python standard library httplib at line 33: self.sock should be self._conn.sock. Also there is a really ugly assumption in Resource:put that filesnames are 7-bit ASCII which is not true on modern filesystems: they could be latin1 or utf-8 for example. The assumption is that if the thing given to the first argument of put matches isbin=re.compile(r'[\000-\006\177-\277]') then it's a string to be put, otherwise it calls os.stat on what could be a very large string full of binary to see if it's a filename to be opened and read. I think this method should be deprecated, and 2 new methods putFile and putString should replace it without the binary assumption code, even if it means changing all of the code that calls this method (probably not many). *** lib/python/webdav/client.py.orig 2004-05-11 21:34:59.000000000 +0100 --- lib/python/webdav/client.py 2007-02-14 12:52:35.000000000 +0000 *************** *** 30,35 **** --- 30,37 ---- self.send(str) def getreply(self): + if not hasattr(self, 'sock'): + self.sock=self._conn.sock file=self.sock.makefile('rb') data=''.join(file.readlines()) file.close()