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 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 lineReceived(self, line): return HTTPClient.lineReceived(self, line.rstrip())
def lineReceived(self, line): try: HTTPClient.lineReceived(self, line.rstrip()) except: self.factory.add_invalid_header(line)