| 396 | |
| 397 | |
| 398 | def serve_favicon(self, handler): |
| 399 | handler.send_response(200) |
| 400 | handler.send_header("Content-type", "image/x-icon") |
| 401 | handler.end_headers() |
| 402 | favicon_path = os.path.join(self.shared_data.webdir, '/images/favicon.ico') |
| 403 | self.logger.info(f"Serving favicon from {favicon_path}") |
| 404 | try: |
| 405 | with open(favicon_path, 'rb') as file: |
| 406 | handler.wfile.write(file.read()) |
| 407 | except FileNotFoundError: |
| 408 | self.logger.error(f"Favicon not found at {favicon_path}") |
| 409 | handler.send_response(404) |
| 410 | handler.end_headers() |
| 411 | |
| 412 | def serve_manifest(self, handler): |
| 413 | handler.send_response(200) |