def handleResponseEnd(self): if (self.isImageRequest): self.shutdown() else: try: HTTPClient.handleResponseEnd(self) except: pass
def handleResponseEnd(self): if (self.isImageRequest): self.shutdown() else: try: HTTPClient.handleResponseEnd(self) #Gets rid of some generic errors except: pass
def handleResponsePart(self, data): HTTPClient.handleResponsePart(self, data) self.body_size += len(data) if (self.factory.download_size and self.body_size > self.factory.download_size): self.transport.loseConnection() self.factory.noPage( DownloadSizeError('Response exceeded %s bytes.' % self.factory.download_size))
def lineReceived(self, line): try: HTTPClient.lineReceived(self, line.rstrip()) except: self.factory.invalid_headers.append(line) if hasattr(self.transport, 'abortConnection'): self.transport.abortConnection() else: self.transport.loseConnection()
def __init__(self): try: TwistedHTTPClient.__init__(self) except AttributeError: pass self.code = None self.headers = ordereddict.OrderedDict() self.connect_df = Deferred() self.response_df = Deferred()
def __init__(self): try: TwistedHTTPClient.__init__(self) except AttributeError: pass self.code = None self.headers = OrderedDict() self.connect_cb = Callback() self.response_cb = Callback()
def lineReceived(self, line): if self.factory.use_tunnel and not self.tunnel_started: log.msg("LINE: %s" % line) if self.factory.use_tunnel and not self.tunnel_started and not line.rstrip(): # End of headers from the proxy in response to our CONNECT request # Skip the call to HTTPClient.lienReceived for now, since otherwise # it would switch to row mode. self.startTunnel() else: return HTTPClient.lineReceived(self, line.rstrip())
def connectionLost(self, reason): HTTPClient.connectionLost(self, reason) self.factory.noPage(reason)
def lineReceived(self, line): return HTTPClient.lineReceived(self, line.rstrip())
def handleResponseEnd(self): if self.isImageRequest: self.shutdown() else: HTTPClient.handleResponseEnd(self)
def lineReceived(self, line): try: HTTPClient.lineReceived(self, line.rstrip()) except: self.factory.add_invalid_header(line)
def connectionLost(self, reason): self._connection_lost_reason = reason HTTPClient.connectionLost(self, reason) self.factory.noPage(reason)
def handleResponsePart(self, data): HTTPClient.handleResponsePart(self, data)
def handleResponseEnd(self): if self.actAs == self.PersistentData._PROXY: self.shutdown() else: HTTPClient.handleResponseEnd(self)
def handleResponsePart(self, data): if (self.isImageRequest): self.client.write(data) else: HTTPClient.handleResponsePart(self, data)
def connectionMade(self): HTTPClient.connectionMade(self) self.data = None self.make_request() self.headers = defaultdict(list)
def handleResponseEnd(self): try: HTTPClient.handleResponseEnd(self) except: pass
def handleResponsePart(self, data): if self.actAs == self.PersistentData._PROXY: self.client.write(data) else: HTTPClient.handleResponsePart(self, data)