Add logging of requests not found
This commit is contained in:
parent
b10d070701
commit
836b21824d
1 changed files with 1 additions and 0 deletions
1
neomi.py
1
neomi.py
|
@ -554,6 +554,7 @@ class Serve(threading.Thread):
|
||||||
file = get_file(full_path, config = self.config)
|
file = get_file(full_path, config = self.config)
|
||||||
|
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
|
log('%s: Requested path not found: %s' % (self.address, path))
|
||||||
reader = StringReader('%s not found\n' % path)
|
reader = StringReader('%s not found\n' % path)
|
||||||
send_header(self.sock, protocol, Status.notfound, 'text/plain', config = self.config)
|
send_header(self.sock, protocol, Status.notfound, 'text/plain', config = self.config)
|
||||||
send_file(self.sock, reader, protocol, 'text/plain', config = self.config)
|
send_file(self.sock, reader, protocol, 'text/plain', config = self.config)
|
||||||
|
|
Loading…
Reference in a new issue