12345678910111213141516171819 |
- From 0b86b89629f32e7c8b859239aa1a4814f256053c Mon Sep 17 00:00:00 2001
- From: sbwml <[email protected]>
- Date: Thu, 28 Sep 2023 16:42:54 +0800
- Subject: [PATCH 3/5] add response for bad request in ServeHTTP handler
- ---
- pkg/server/http_handler.go | 1 +
- 1 file changed, 1 insertion(+)
- --- a/pkg/server/http_handler.go
- +++ b/pkg/server/http_handler.go
- @@ -93,6 +93,7 @@ func (h *HttpHandler) ServeHTTP(w http.R
- if err != nil {
- h.warnErr(req, "invalid request", err)
- w.WriteHeader(http.StatusBadRequest)
- + w.Write([]byte("Bad Request"))
- return
- }
-
|