Fix up empty paste bug

This commit is contained in:
Eliot Whalan 2016-06-23 14:57:07 +10:00
parent c92d72b790
commit a8b18ae11c
No known key found for this signature in database
GPG Key ID: C0A42175139840D6
1 changed files with 1 additions and 0 deletions

View File

@ -136,6 +136,7 @@ func saveHandler(w http.ResponseWriter, r *http.Request) {
lang := r.FormValue("lang") lang := r.FormValue("lang")
if paste == "" { if paste == "" {
http.Error(w, "Empty paste", 500) http.Error(w, "Empty paste", 500)
return
} }
values := save(paste, lang) values := save(paste, lang)
b := &Response{ b := &Response{