Fixes
This commit is contained in:
parent
556fe5920e
commit
bbac6a5e2e
18
app.py
18
app.py
@ -22,6 +22,15 @@ class ProxyHandler(http.server.BaseHTTPRequestHandler):
|
||||
def log_message(self, format, *args):
|
||||
pass
|
||||
|
||||
def finish(self,*args,**kw):
|
||||
try:
|
||||
if not self.wfile.closed:
|
||||
self.wfile.flush()
|
||||
self.wfile.close()
|
||||
except socket.error:
|
||||
pass
|
||||
self.rfile.close()
|
||||
|
||||
def do_GET(self):
|
||||
self.handle_request('GET')
|
||||
|
||||
@ -113,15 +122,6 @@ class ProxyHandler(http.server.BaseHTTPRequestHandler):
|
||||
|
||||
self.wfile.flush()
|
||||
|
||||
def finish(self,*args,**kw):
|
||||
try:
|
||||
if not self.wfile.closed:
|
||||
self.wfile.flush()
|
||||
self.wfile.close()
|
||||
except socket.error:
|
||||
pass
|
||||
self.rfile.close()
|
||||
|
||||
class ThreadedHTTPServer(ThreadingMixIn, http.server.HTTPServer):
|
||||
"""Handle requests in a separate thread."""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user