=== modified file 'bzrlib/transport/http/response.py' --- bzrlib/transport/http/response.py 2006-07-18 20:27:50 +0000 +++ bzrlib/transport/http/response.py 2006-07-28 22:40:39 +0000 @@ -73,6 +73,7 @@ self._len = 0 self._ranges = [] self._data = input_file.read() + input_file.close() def _add_range(self, ent_start, ent_end, data_start): """Add an entity range. @@ -265,7 +266,9 @@ # urllib doesn't support seek, so we wrap it in a StringIO tell = getattr(data, 'tell', None) if tell is None: - return StringIO(data.read()) + sio = StringIO(data.read()) + data.close() + return sio return data elif code == 404: raise errors.NoSuchFile(url)