refactor: fix incorrect logic introduced in previous commits and improve error handling

This commit is contained in:
yusing
2025-11-07 15:48:38 +08:00
parent d33ff2192a
commit e9ac3cd1a9
14 changed files with 99 additions and 50 deletions

View File

@@ -15,8 +15,6 @@ import (
_ "unsafe"
)
// FIXME: html and js ccannot be separte
type ForceCacheControl struct {
expires string
http.ResponseWriter
@@ -179,6 +177,7 @@ func (w *Watcher) wakeFromHTTP(rw http.ResponseWriter, r *http.Request) (shouldN
if !acceptHTML {
serveStaticContent(rw, http.StatusOK, "text/plain", []byte("Container woken"))
return false
}
// Send a loading response to the client