Chap19 738 (#740)

* fix http response content-type error

* fix_chap19_739
This commit is contained in:
yifeng01
2019-11-26 06:44:31 +08:00
committed by Unknwon
parent cb2533e60e
commit 994720ab07
2 changed files with 3 additions and 2 deletions

View File

@@ -33,6 +33,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
}