Kaynağa Gözat

Return 404 status for houses not found

This also passes the error back.
master
Matt Baer 6 yıl önce
ebeveyn
işleme
5c69d90f1c
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. +2
    -1
      construction.go

+ 2
- 1
construction.go Dosyayı Görüntüle

@@ -236,8 +236,9 @@ func getHouse(app *app, w http.ResponseWriter, r *http.Request) error {
if err != nil { if err != nil {
page = []byte("<!DOCTYPE html><html><body>HTMLlot.</body></html>") page = []byte("<!DOCTYPE html><html><body>HTMLlot.</body></html>")
} }
w.WriteHeader(http.StatusNotFound)
fmt.Fprintf(w, "%s", page) fmt.Fprintf(w, "%s", page)
return nil
return err
} }
} }
return err return err


Yükleniyor…
İptal
Kaydet