diff options
| author | Shulhan <ms@kilabit.info> | 2024-02-16 00:24:47 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-02-16 01:38:51 +0700 |
| commit | 2b6dc0730aa3c30787e440c1090b8041ff6b4ca8 (patch) | |
| tree | 588439eafdb7cdae7d5d469e7f688e6fd206c00a /errors.go | |
| parent | 372d10a3e1ea01f8d03e44e6ab8be673d05c0773 (diff) | |
| download | gorankusu-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.go | 8 |
1 files changed, 0 insertions, 8 deletions
@@ -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{ |
