Improve the comment explaining why handleBooting returns an iPXE script.

This commit is contained in:
David Anderson 2017-02-24 15:30:38 -08:00
parent a9d71481f7
commit 4e411248b1

View File

@ -153,10 +153,9 @@ func (s *Server) handleFile(w http.ResponseWriter, r *http.Request) {
}
func (s *Server) handleBooting(w http.ResponseWriter, r *http.Request) {
// 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
// Return a no-op boot script, to satisfy iPXE. It won't get used,
// the boot script deletes this image immediately after
// downloading.
fmt.Fprintf(w, "# Booting")
macStr := r.URL.Query().Get("mac")