404 if image not found

master
Bob Mottram 2019-08-16 23:21:34 +01:00
parent 5af97894f4
commit 6c6b436cb7
1 changed files with 5 additions and 1 deletions

View File

@ -526,6 +526,7 @@ class PubServer(BaseHTTPRequestHandler):
self._set_headers('image/png',len(mediaBinary),cookie) self._set_headers('image/png',len(mediaBinary),cookie)
self.wfile.write(mediaBinary) self.wfile.write(mediaBinary)
self.wfile.flush() self.wfile.flush()
self._404()
return return
# login screen background image # login screen background image
if self.path=='/login-background.png': if self.path=='/login-background.png':
@ -537,6 +538,8 @@ class PubServer(BaseHTTPRequestHandler):
self._set_headers('image/png',len(mediaBinary),cookie) self._set_headers('image/png',len(mediaBinary),cookie)
self.wfile.write(mediaBinary) self.wfile.write(mediaBinary)
self.wfile.flush() self.wfile.flush()
return
self._404()
return return
# follow screen background image # follow screen background image
if self.path=='/follow-background.png': if self.path=='/follow-background.png':
@ -548,6 +551,7 @@ class PubServer(BaseHTTPRequestHandler):
self._set_headers('image/png',len(mediaBinary),cookie) self._set_headers('image/png',len(mediaBinary),cookie)
self.wfile.write(mediaBinary) self.wfile.write(mediaBinary)
self.wfile.flush() self.wfile.flush()
self._404()
return return
# emoji images # emoji images
if '/emoji/' in self.path: if '/emoji/' in self.path: