mirror of
https://github.com/radio95-rnt/RadioPlayer.git
synced 2026-07-30 15:59:16 +02:00
no resolve and fail?
This commit is contained in:
+2
-2
@@ -113,7 +113,7 @@ def websocket_server_process(shared_data: dict, imc_q: multiprocessing.Queue, ws
|
|||||||
await websocket.close(1001, "")
|
await websocket.close(1001, "")
|
||||||
clients.discard(websocket)
|
clients.discard(websocket)
|
||||||
async def process_request(websocket: ServerConnection, request: Request):
|
async def process_request(websocket: ServerConnection, request: Request):
|
||||||
if request.path == "/" and (file := Path(__file__, "..", "web.html")).exists():
|
if request.path == "/" and (file := Path(__file__, "..", "web.html").resolve()).exists():
|
||||||
data = file.read_bytes()
|
data = file.read_bytes()
|
||||||
return Response(
|
return Response(
|
||||||
200,
|
200,
|
||||||
@@ -121,7 +121,7 @@ def websocket_server_process(shared_data: dict, imc_q: multiprocessing.Queue, ws
|
|||||||
Headers([("Content-Type", "text/html"), ("Content-Length", f"{len(data)}")]),
|
Headers([("Content-Type", "text/html"), ("Content-Length", f"{len(data)}")]),
|
||||||
data
|
data
|
||||||
)
|
)
|
||||||
if request.path == "/web.js" and (file := Path(__file__, "..", "web.js")).exists():
|
if request.path == "/web.js" and (file := Path(__file__, "..", "web.js").resolve()).exists():
|
||||||
data = file.read_bytes()
|
data = file.read_bytes()
|
||||||
return Response(
|
return Response(
|
||||||
200,
|
200,
|
||||||
|
|||||||
Reference in New Issue
Block a user