From 186b714a6578ac666e1bb9a623a3b5a63525f668 Mon Sep 17 00:00:00 2001 From: Yifu Yu Date: Fri, 9 Aug 2024 19:41:59 +0800 Subject: [PATCH] Fix more stupid NOP body things. --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index 3f80852..58eac18 100644 --- a/main.go +++ b/main.go @@ -211,6 +211,10 @@ func clientHandler(w http.ResponseWriter, r *http.Request) { // Fuck you golang, you should never eat write but fail return } + if r.Method != http.MethodGet { + w.WriteHeader(405) + return + } ch := NewClientChannel(name) defer ch.Close() for {