fixed chapter_19 examples error :add http header (#814)

This commit is contained in:
FrogIsToad
2021-12-21 08:51:54 -06:00
committed by GitHub
parent fa957b3af5
commit fc532ba40d

View File

@@ -26,6 +26,7 @@ func Redirect(w http.ResponseWriter, r *http.Request) {
func Add(w http.ResponseWriter, r *http.Request) {
url := r.FormValue("url")
if url == "" {
w.Header().Set("Content-Type", "text/html")
fmt.Fprint(w, AddForm)
return
}