From a9d71481f77d8130cf3c20c8df8caed49dbac24b Mon Sep 17 00:00:00 2001 From: Phenix Rizen Date: Fri, 24 Feb 2017 15:22:11 -0800 Subject: [PATCH] handleBooting should return a no-op script, not an error. Responding with an error makes iPXE print a misleading error message (misleading because it doesn't break the boot in any way, it just makes humans uncomfortable). --- pixiecore/http.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pixiecore/http.go b/pixiecore/http.go index 3dbb0cb..bd6dba9 100644 --- a/pixiecore/http.go +++ b/pixiecore/http.go @@ -153,8 +153,11 @@ func (s *Server) handleFile(w http.ResponseWriter, r *http.Request) { } func (s *Server) handleBooting(w http.ResponseWriter, r *http.Request) { - // This handler always errors out. - http.Error(w, "", http.StatusInternalServerError) + // This should not always errors out. + // if we send http.StatusInternalServerError iPXE will get a image not found error + // http.Error(w, "", http.StatusInternalServerError) + // return a empty commented script + fmt.Fprintf(w, "# Booting") macStr := r.URL.Query().Get("mac") if macStr == "" {