'When the connection used to issue the HTTP request is closed, notify the
factory if we have not already, so it can produce a result.'

def connectionLost(self, reason):

    if (not self.quietLoss):
        http.HTTPClient.connectionLost(self, reason)
        self.factory.noPage(reason)
    if self._completelyDone:
        self.factory._disconnectedDeferred.callback(None)
