示例#1
0
 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()
示例#2
0
 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()
示例#3
0
 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())
示例#4
0
 def lineReceived(self, line):
     return HTTPClient.lineReceived(self, line.rstrip())
示例#5
0
 def lineReceived(self, line):
     try:
         HTTPClient.lineReceived(self, line.rstrip())
     except:
         self.factory.add_invalid_header(line)