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).
This commit is contained in:
Phenix Rizen 2017-02-24 15:22:11 -08:00 committed by Dave Anderson
parent 80ce588fdd
commit a9d71481f7

View File

@ -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 == "" {