diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2022-03-11 12:34:55 -0700 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2022-03-11 12:34:55 -0700 |
commit | 3d616e8c6d65e5617f5a918d72fb1514c9c7144e (patch) | |
tree | c9d4625edc176dae528faf7cfebdd107089c4397 /modules/caddyhttp/errors.go | |
parent | b82e22b459b9f81278810dc32916ca270efa888c (diff) |
requestbody: Return HTTP 413 (fix #4558)
Diffstat (limited to 'modules/caddyhttp/errors.go')
-rw-r--r-- | modules/caddyhttp/errors.go | 3 |
1 files changed, 3 insertions, 0 deletions
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 |