mirror of
https://github.com/danderson/netboot.git
synced 2025-08-08 15:47:11 +02:00
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:
parent
80ce588fdd
commit
a9d71481f7
@ -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 == "" {
|
||||
|
Loading…
Reference in New Issue
Block a user