From e94d55a76869d71745e928e856d4bf61c939ec86 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 22 Jul 2019 16:14:39 +0100 Subject: [PATCH] Comments --- daemon.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/daemon.py b/daemon.py index 03908d62..747ffb09 100644 --- a/daemon.py +++ b/daemon.py @@ -378,7 +378,11 @@ class PubServer(BaseHTTPRequestHandler): with open(avatarFilename, 'rb') as avFile: avBinary = avFile.read() self.wfile.write(avBinary) - return + return + + # This busy state helps to avoid flooding + # Resources which are expected to be called from a web page + # should be above this if self.server.GETbusy: currTimeGET=int(time.time()) if currTimeGET-self.server.lastGET<10: @@ -390,8 +394,6 @@ class PubServer(BaseHTTPRequestHandler): self.server.lastGET=currTimeGET self.server.GETbusy=True - #print('Accept: '+self.headers['Accept']) - if not self._permittedDir(self.path): if self.server.debug: print('DEBUG: GET Not permitted')