mirror of
https://github.com/Gabi-Zar/Pico-2W-Computer-Power-Controller.git
synced 2026-08-02 23:36:23 +02:00
Add favicon route
This commit is contained in:
9
main.py
9
main.py
@@ -316,6 +316,15 @@ async def serve_client(reader, writer):
|
||||
)
|
||||
await writer.drain()
|
||||
return
|
||||
|
||||
if method == "GET" and path == "/favicon.ico":
|
||||
writer.write(
|
||||
"HTTP/1.0 204 No Content\r\n"
|
||||
"Connection: close\r\n"
|
||||
"\r\n"
|
||||
)
|
||||
await writer.drain()
|
||||
return
|
||||
|
||||
if method == "POST" and path == "/computer" and content_length > 0:
|
||||
body = await reader.read(content_length)
|
||||
|
||||
Reference in New Issue
Block a user