From 3d616e8c6d65e5617f5a918d72fb1514c9c7144e Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Fri, 11 Mar 2022 12:34:55 -0700 Subject: requestbody: Return HTTP 413 (fix #4558) --- modules/caddyhttp/errors.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/caddyhttp/errors.go') diff --git a/modules/caddyhttp/errors.go b/modules/caddyhttp/errors.go index 85dc3df..9d1cf47 100644 --- a/modules/caddyhttp/errors.go +++ b/modules/caddyhttp/errors.go @@ -82,6 +82,9 @@ func (e HandlerError) Error() string { return strings.TrimSpace(s) } +// Unwrap returns the underlying error value. See the `errors` package for info. +func (e HandlerError) Unwrap() error { return e.Err } + // randString returns a string of n random characters. // It is not even remotely secure OR a proper distribution. // But it's good enough for some things. It excludes certain -- cgit v1.2.3