diff --git a/ghost/ghost.py b/ghost/ghost.py index b938db8..d8250dd 100755 --- a/ghost/ghost.py +++ b/ghost/ghost.py @@ -216,13 +216,6 @@ def __init__(self, session, reply, content): self._reply = reply -def replyReadyRead(reply): - if not hasattr(reply, 'data'): - reply.data = '' - - reply.data += reply.peek(reply.bytesAvailable()) - - class NetworkAccessManager(QNetworkAccessManager): """Subclass QNetworkAccessManager to always cache the reply content @@ -254,7 +247,6 @@ def createRequest(self, operation, request, data): request, data ) - reply.readyRead.connect(lambda reply=reply: replyReadyRead(reply)) reply.downloadProgress.connect( lambda received, total: @@ -1332,6 +1324,8 @@ def _request_ended(self, reply): except AttributeError: content = reply.readAll() + self.logger.debug('[%s] len %d', str(reply.url()), len(content)) + self.http_resources.append(HttpResource( self, reply,