aboutsummaryrefslogtreecommitdiff
path: root/errors.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-02-16 00:24:47 +0700
committerShulhan <ms@kilabit.info>2024-02-16 01:38:51 +0700
commit2b6dc0730aa3c30787e440c1090b8041ff6b4ca8 (patch)
tree588439eafdb7cdae7d5d469e7f688e6fd206c00a /errors.go
parent372d10a3e1ea01f8d03e44e6ab8be673d05c0773 (diff)
downloadgorankusu-2b6dc0730aa3c30787e440c1090b8041ff6b4ca8.tar.xz
all: set default HTTPTarget Attack if its not set
Previously, the function for Attack need to be coded manually. This changes introduce new function DefaultHTTPAttack that generate HTTPAttackHandler based on the HTTPTarget method, request type, and Params; if AllowAttack is true and Attack is nil. Implements: https://todo.sr.ht/~shulhan/gorankusu/4
Diffstat (limited to 'errors.go')
-rw-r--r--errors.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/errors.go b/errors.go
index 42781ea..b2ff902 100644
--- a/errors.go
+++ b/errors.go
@@ -35,14 +35,6 @@ func errAttackNotAllowed() error {
return res
}
-var errAttackHandlerNotSet = libhttp.EndpointResponse{
- E: liberrors.E{
- Code: http.StatusNotAcceptable,
- Message: `the Attack handler is not set`,
- Name: `ERR_ATTACK_HANDLER_NOT_SET`,
- },
-}
-
func errInternal(err error) error {
res := &libhttp.EndpointResponse{
E: liberrors.E{