httpd flake8 fixes

python3android
lakshyacis 3 years ago
parent 2c71612a4b
commit 28e954902d
No known key found for this signature in database
GPG Key ID: D2C539C8EC63E9EB
  1. 9
      src/network/httpd.py

@ -3,6 +3,7 @@ import socket
from tls import TLSHandshake
class HTTPRequestHandler(asyncore.dispatcher):
response = """HTTP/1.0 200 OK\r
Date: Sun, 23 Oct 2016 18:02:00 GMT\r
@ -66,7 +67,12 @@ class HTTPSRequestHandler(HTTPRequestHandler, TLSHandshake):
if not hasattr(self, '_map'):
asyncore.dispatcher.__init__(self, sock)
# self.tlsDone = False
TLSHandshake.__init__(self, sock=sock, certfile='/home/shurdeek/src/PyBitmessage/src/sslkeys/cert.pem', keyfile='/home/shurdeek/src/PyBitmessage/src/sslkeys/key.pem', server_side=True)
TLSHandshake.__init__(
self,
sock=sock,
certfile='/home/shurdeek/src/PyBitmessage/src/sslkeys/cert.pem',
keyfile='/home/shurdeek/src/PyBitmessage/src/sslkeys/key.pem',
server_side=True)
HTTPRequestHandler.__init__(self, sock)
def handle_connect(self):
@ -143,6 +149,7 @@ class HTTPSServer(HTTPServer):
# print "Processed %i connections, active %i" % (self.connections, len(asyncore.socket_map))
HTTPSRequestHandler(sock)
if __name__ == "__main__":
client = HTTPSServer()
asyncore.loop()

Loading…
Cancel
Save