mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-05 18:44:03 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
97c049ed0a
commit
0acff03804
14253 files changed
+3893239
No files matched your search
@@ -0,0 +1,19 @@
|
||||
From 0b86b89629f32e7c8b859239aa1a4814f256053c Mon Sep 17 00:00:00 2001
|
||||
From: sbwml <admin@cooluc.com>
|
||||
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
|
||||
@@ -91,6 +91,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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user