I am trying to send a 404 response code in my do_GET but all I get is a blank page. How does one send a response code? TIA
if (os.path.isfile(fn)):
self.send_response(200)
self.send_header('Content-type',ctype)
self.end_headers()
fh=open(fn,'rb')
string=fh.read()
self.wfile.write(string)
else:
self.send_response(404,message='Not Found')
self.end_headers()