diff --git a/home/control_update.go b/home/control_update.go index 80ade843..d734f4d1 100644 --- a/home/control_update.go +++ b/home/control_update.go @@ -45,10 +45,13 @@ func handleGetVersionJSON(w http.ResponseWriter, r *http.Request) { } req := getVersionJSONRequest{} - err := json.NewDecoder(r.Body).Decode(&req) - if err != nil { - httpError(w, http.StatusBadRequest, "JSON parse: %s", err) - return + var err error + if r.ContentLength != 0 { + err = json.NewDecoder(r.Body).Decode(&req) + if err != nil { + httpError(w, http.StatusBadRequest, "JSON parse: %s", err) + return + } } now := time.Now()