master
Bob Mottram 2019-08-15 12:42:01 +01:00
parent 6cab61f69c
commit 27b4e8f3ac
1 changed files with 10 additions and 1 deletions

View File

@ -477,7 +477,7 @@ class PubServer(BaseHTTPRequestHandler):
self.send_response(303) self.send_response(303)
self.send_header('Location', '/login') self.send_header('Location', '/login')
self.end_headers() self.end_headers()
self.server.POSTbusy=False self.server.GETbusy=False
return return
# get css # get css
@ -488,6 +488,7 @@ class PubServer(BaseHTTPRequestHandler):
css = cssfile.read() css = cssfile.read()
self._set_headers('text/css',cookie) self._set_headers('text/css',cookie)
self.wfile.write(css.encode('utf-8')) self.wfile.write(css.encode('utf-8'))
self.wfile.flush()
return return
# image on login screen # image on login screen
if self.path=='/login.png': if self.path=='/login.png':
@ -498,6 +499,7 @@ class PubServer(BaseHTTPRequestHandler):
with open(mediaFilename, 'rb') as avFile: with open(mediaFilename, 'rb') as avFile:
mediaBinary = avFile.read() mediaBinary = avFile.read()
self.wfile.write(mediaBinary) self.wfile.write(mediaBinary)
self.wfile.flush()
return return
# login screen background image # login screen background image
if self.path=='/login-background.png': if self.path=='/login-background.png':
@ -508,6 +510,7 @@ class PubServer(BaseHTTPRequestHandler):
with open(mediaFilename, 'rb') as avFile: with open(mediaFilename, 'rb') as avFile:
mediaBinary = avFile.read() mediaBinary = avFile.read()
self.wfile.write(mediaBinary) self.wfile.write(mediaBinary)
self.wfile.flush()
return return
# follow screen background image # follow screen background image
if self.path=='/follow-background.png': if self.path=='/follow-background.png':
@ -518,6 +521,7 @@ class PubServer(BaseHTTPRequestHandler):
with open(mediaFilename, 'rb') as avFile: with open(mediaFilename, 'rb') as avFile:
mediaBinary = avFile.read() mediaBinary = avFile.read()
self.wfile.write(mediaBinary) self.wfile.write(mediaBinary)
self.wfile.flush()
return return
# emoji images # emoji images
if '/emoji/' in self.path: if '/emoji/' in self.path:
@ -537,6 +541,7 @@ class PubServer(BaseHTTPRequestHandler):
with open(emojiFilename, 'rb') as avFile: with open(emojiFilename, 'rb') as avFile:
emojiBinary = avFile.read() emojiBinary = avFile.read()
self.wfile.write(emojiBinary) self.wfile.write(emojiBinary)
self.wfile.flush()
return return
self._404() self._404()
return return
@ -559,6 +564,7 @@ class PubServer(BaseHTTPRequestHandler):
with open(mediaFilename, 'rb') as avFile: with open(mediaFilename, 'rb') as avFile:
mediaBinary = avFile.read() mediaBinary = avFile.read()
self.wfile.write(mediaBinary) self.wfile.write(mediaBinary)
self.wfile.flush()
return return
self._404() self._404()
return return
@ -581,6 +587,7 @@ class PubServer(BaseHTTPRequestHandler):
with open(mediaFilename, 'rb') as avFile: with open(mediaFilename, 'rb') as avFile:
mediaBinary = avFile.read() mediaBinary = avFile.read()
self.wfile.write(mediaBinary) self.wfile.write(mediaBinary)
self.wfile.flush()
return return
self._404() self._404()
return return
@ -597,6 +604,7 @@ class PubServer(BaseHTTPRequestHandler):
with open(mediaFilename, 'rb') as avFile: with open(mediaFilename, 'rb') as avFile:
mediaBinary = avFile.read() mediaBinary = avFile.read()
self.wfile.write(mediaBinary) self.wfile.write(mediaBinary)
self.wfile.flush()
return return
self._404() self._404()
return return
@ -624,6 +632,7 @@ class PubServer(BaseHTTPRequestHandler):
with open(avatarFilename, 'rb') as avFile: with open(avatarFilename, 'rb') as avFile:
avBinary = avFile.read() avBinary = avFile.read()
self.wfile.write(avBinary) self.wfile.write(avBinary)
self.wfile.flush()
return return
# This busy state helps to avoid flooding # This busy state helps to avoid flooding