mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-04 20:56:46 +02:00
Fix tile server.
This commit is contained in:
parent
970046aa86
commit
c4005655ef
1 changed files with 6 additions and 4 deletions
|
@ -20,12 +20,13 @@ class Handler(SimpleHTTPRequestHandler):
|
|||
HTTP request handler that process sloppy map tile requests.
|
||||
"""
|
||||
|
||||
cache: Path = Path("cache")
|
||||
update_cache: bool = False
|
||||
|
||||
def __init__(
|
||||
self, request: bytes, client_address: tuple[str, int], server
|
||||
) -> None:
|
||||
super().__init__(request, client_address, server)
|
||||
self.cache: Path = Path("cache")
|
||||
self.update_cache: bool = False
|
||||
|
||||
def do_GET(self) -> None:
|
||||
"""Serve a GET request."""
|
||||
|
@ -64,8 +65,9 @@ def ui(options) -> None:
|
|||
server: Optional[HTTPServer] = None
|
||||
try:
|
||||
port: int = 8080
|
||||
server: HTTPServer = HTTPServer(("", port), Handler)
|
||||
server.cache_path = Path(options.cache)
|
||||
handler = Handler
|
||||
handler.cache = Path(options.cache)
|
||||
server: HTTPServer = HTTPServer(("", port), handler)
|
||||
server.serve_forever()
|
||||
logging.info(f"Server started on port {port}.")
|
||||
finally:
|
||||
|
|
Loading…
Add table
Reference in a new issue