Return after writing response
Anirudh Oppiliappan x@icyphox.sh
Wed, 29 Dec 2021 20:12:47 +0530
1 files changed,
2 insertions(+),
0 deletions(-)
jump to
M
main.go
→
main.go
@@ -81,6 +81,7 @@ key := getKey(r)
if secretKey != key { log.Printf("incorrect key: %v\n", key) w.WriteHeader(401) + return } json.NewDecoder(r.Body).Decode(&h) log.Printf(h.String())@@ -88,6 +89,7 @@
if err := h.WriteTSV(hFile); err != nil { log.Printf("error: %v\n", err) w.WriteHeader(500) + return } w.WriteHeader(204) })