http flake8 fixes
This commit is contained in:
parent
68e09a5e30
commit
7eced454d1
|
@ -2,11 +2,13 @@ import socket
|
||||||
|
|
||||||
from advanceddispatcher import AdvancedDispatcher
|
from advanceddispatcher import AdvancedDispatcher
|
||||||
import asyncore_pollchoose as asyncore
|
import asyncore_pollchoose as asyncore
|
||||||
from proxy import Proxy, ProxyError, GeneralProxyError
|
from proxy import ProxyError
|
||||||
from socks5 import Socks5Connection, Socks5Resolver, Socks5AuthError, Socks5Error
|
from socks5 import Socks5Connection, Socks5Resolver
|
||||||
from socks4a import Socks4aConnection, Socks4aResolver, Socks4aError
|
from socks4a import Socks4aConnection, Socks4aResolver
|
||||||
|
|
||||||
class HttpError(ProxyError): pass
|
|
||||||
|
class HttpError(ProxyError):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class HttpConnection(AdvancedDispatcher):
|
class HttpConnection(AdvancedDispatcher):
|
||||||
|
@ -19,7 +21,9 @@ class HttpConnection(AdvancedDispatcher):
|
||||||
print "connecting in background to %s:%i" % (self.destination[0], self.destination[1])
|
print "connecting in background to %s:%i" % (self.destination[0], self.destination[1])
|
||||||
|
|
||||||
def state_init(self):
|
def state_init(self):
|
||||||
self.append_write_buf("GET %s HTTP/1.1\r\nHost: %s\r\nConnection: close\r\n\r\n" % (self.path, self.destination[0]))
|
self.append_write_buf(
|
||||||
|
"GET %s HTTP/1.1\r\nHost: %s\r\nConnection: close\r\n\r\n" % (
|
||||||
|
self.path, self.destination[0]))
|
||||||
print "Sending %ib" % (len(self.write_buf))
|
print "Sending %ib" % (len(self.write_buf))
|
||||||
self.set_state("http_request_sent", 0)
|
self.set_state("http_request_sent", 0)
|
||||||
return False
|
return False
|
||||||
|
|
Reference in New Issue
Block a user