From e53c77e2be20bfb5423f2f529f2fdfdf70586dbb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 14:44:16 +0000 Subject: [PATCH] build(deps): bump github.com/go-chi/chi/v5 from 5.3.0 to 5.3.1 Bumps [github.com/go-chi/chi/v5](https://github.com/go-chi/chi) from 5.3.0 to 5.3.1. - [Release notes](https://github.com/go-chi/chi/releases) - [Changelog](https://github.com/go-chi/chi/blob/master/CHANGELOG.md) - [Commits](https://github.com/go-chi/chi/compare/v5.3.0...v5.3.1) --- updated-dependencies: - dependency-name: github.com/go-chi/chi/v5 dependency-version: 5.3.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 ++-- vendor/github.com/go-chi/chi/v5/README.md | 1 + vendor/github.com/go-chi/chi/v5/chi.go | 1 + .../github.com/go-chi/chi/v5/middleware/compress.go | 2 ++ vendor/github.com/go-chi/chi/v5/middleware/logger.go | 2 +- .../github.com/go-chi/chi/v5/middleware/profiler.go | 1 - .../github.com/go-chi/chi/v5/middleware/recoverer.go | 12 +++++++++--- .../go-chi/chi/v5/middleware/wrap_writer.go | 10 ++++++---- vendor/github.com/go-chi/chi/v5/mux.go | 6 ++++++ vendor/github.com/go-chi/chi/v5/tree.go | 10 +++++++++- vendor/modules.txt | 2 +- 12 files changed, 39 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index 2cee1eb918..c888bc15d3 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e github.com/gabriel-vasile/mimetype v1.4.13 github.com/ggwhite/go-masker v1.1.0 - github.com/go-chi/chi/v5 v5.3.0 + github.com/go-chi/chi/v5 v5.3.1 github.com/go-chi/render v1.0.3 github.com/go-jose/go-jose/v3 v3.0.5 github.com/go-ldap/ldap/v3 v3.4.13 diff --git a/go.sum b/go.sum index 974d1aa47a..b956121d8f 100644 --- a/go.sum +++ b/go.sum @@ -373,8 +373,8 @@ github.com/go-asn1-ber/asn1-ber v1.4.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkPro github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 h1:BP4M0CvQ4S3TGls2FvczZtj5Re/2ZzkV9VwqPHH/3Bo= github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ= -github.com/go-chi/chi/v5 v5.3.0 h1:halUjDxhshgXHMrao5bB8eNBXo/rnzwr8m5m36glehM= -github.com/go-chi/chi/v5 v5.3.0/go.mod h1:R+tYY2hNuVUUjxoPtqUdgBqevM9s9njzkTLutVsOCto= +github.com/go-chi/chi/v5 v5.3.1 h1:3j4HZLGZQ3JpMCrPJF/Jl3mYJfWLKBfNJ6quurUGCf8= +github.com/go-chi/chi/v5 v5.3.1/go.mod h1:R+tYY2hNuVUUjxoPtqUdgBqevM9s9njzkTLutVsOCto= github.com/go-chi/render v1.0.3 h1:AsXqd2a1/INaIfUSKq3G5uA8weYx20FOsM7uSoCyyt4= github.com/go-chi/render v1.0.3/go.mod h1:/gr3hVkmYR0YlEy3LxCuVRFzEu9Ruok+gFqbIofjao0= github.com/go-cmd/cmd v1.0.5/go.mod h1:y8q8qlK5wQibcw63djSl/ntiHUHXHGdCkPk0j4QeW4s= diff --git a/vendor/github.com/go-chi/chi/v5/README.md b/vendor/github.com/go-chi/chi/v5/README.md index a116596db9..e668e2041d 100644 --- a/vendor/github.com/go-chi/chi/v5/README.md +++ b/vendor/github.com/go-chi/chi/v5/README.md @@ -221,6 +221,7 @@ type Router interface { Patch(pattern string, h http.HandlerFunc) Post(pattern string, h http.HandlerFunc) Put(pattern string, h http.HandlerFunc) + Query(pattern string, h http.HandlerFunc) Trace(pattern string, h http.HandlerFunc) // NotFound defines a handler to respond whenever a route could diff --git a/vendor/github.com/go-chi/chi/v5/chi.go b/vendor/github.com/go-chi/chi/v5/chi.go index ad0ca74601..cb129e3054 100644 --- a/vendor/github.com/go-chi/chi/v5/chi.go +++ b/vendor/github.com/go-chi/chi/v5/chi.go @@ -102,6 +102,7 @@ type Router interface { Patch(pattern string, h http.HandlerFunc) Post(pattern string, h http.HandlerFunc) Put(pattern string, h http.HandlerFunc) + Query(pattern string, h http.HandlerFunc) Trace(pattern string, h http.HandlerFunc) // NotFound defines a handler to respond whenever a route could diff --git a/vendor/github.com/go-chi/chi/v5/middleware/compress.go b/vendor/github.com/go-chi/chi/v5/middleware/compress.go index 4e46f70af8..2c963c5d13 100644 --- a/vendor/github.com/go-chi/chi/v5/middleware/compress.go +++ b/vendor/github.com/go-chi/chi/v5/middleware/compress.go @@ -23,6 +23,8 @@ var defaultCompressibleContentTypes = []string{ "application/json", "application/atom+xml", "application/rss+xml", + "application/xml", + "text/xml", "image/svg+xml", } diff --git a/vendor/github.com/go-chi/chi/v5/middleware/logger.go b/vendor/github.com/go-chi/chi/v5/middleware/logger.go index 4d30a9a53c..ba5391f64a 100644 --- a/vendor/github.com/go-chi/chi/v5/middleware/logger.go +++ b/vendor/github.com/go-chi/chi/v5/middleware/logger.go @@ -166,7 +166,7 @@ func (l *defaultLogEntry) Write(status, bytes int, header http.Header, elapsed t } func (l *defaultLogEntry) Panic(v interface{}, stack []byte) { - PrintPrettyStack(v) + printPrettyStack(v, l.useColor) } func init() { diff --git a/vendor/github.com/go-chi/chi/v5/middleware/profiler.go b/vendor/github.com/go-chi/chi/v5/middleware/profiler.go index 0ad6a996bc..5784ff68e3 100644 --- a/vendor/github.com/go-chi/chi/v5/middleware/profiler.go +++ b/vendor/github.com/go-chi/chi/v5/middleware/profiler.go @@ -1,5 +1,4 @@ //go:build !tinygo -// +build !tinygo package middleware diff --git a/vendor/github.com/go-chi/chi/v5/middleware/recoverer.go b/vendor/github.com/go-chi/chi/v5/middleware/recoverer.go index 81342dfa7d..ba77de74fb 100644 --- a/vendor/github.com/go-chi/chi/v5/middleware/recoverer.go +++ b/vendor/github.com/go-chi/chi/v5/middleware/recoverer.go @@ -52,9 +52,16 @@ func Recoverer(next http.Handler) http.Handler { var recovererErrorWriter io.Writer = os.Stderr func PrintPrettyStack(rvr interface{}) { + printPrettyStack(rvr, true) +} + +// printPrettyStack prints a formatted stack trace to stderr. When useColor is +// false, ANSI colour codes are suppressed, which is useful for terminals that +// do not support them (e.g. on Windows) or when output is being captured. +func printPrettyStack(rvr interface{}, useColor bool) { debugStack := debug.Stack() s := prettyStack{} - out, err := s.parse(debugStack, rvr) + out, err := s.parse(debugStack, rvr, useColor) if err == nil { recovererErrorWriter.Write(out) } else { @@ -66,9 +73,8 @@ func PrintPrettyStack(rvr interface{}) { type prettyStack struct { } -func (s prettyStack) parse(debugStack []byte, rvr interface{}) ([]byte, error) { +func (s prettyStack) parse(debugStack []byte, rvr interface{}, useColor bool) ([]byte, error) { var err error - useColor := true buf := &bytes.Buffer{} cW(buf, false, bRed, "\n") diff --git a/vendor/github.com/go-chi/chi/v5/middleware/wrap_writer.go b/vendor/github.com/go-chi/chi/v5/middleware/wrap_writer.go index b2de875283..936ce7e803 100644 --- a/vendor/github.com/go-chi/chi/v5/middleware/wrap_writer.go +++ b/vendor/github.com/go-chi/chi/v5/middleware/wrap_writer.go @@ -207,10 +207,12 @@ func (f *http2FancyWriter) Push(target string, opts *http.PushOptions) error { } func (f *httpFancyWriter) ReadFrom(r io.Reader) (int64, error) { - if f.basicWriter.tee != nil { - // Route through basicWriter.Write so that data is also written to the - // tee writer. basicWriter.Write already increments basicWriter.bytes, - // so we must NOT add n again here (that would double-count). + if f.basicWriter.tee != nil || f.basicWriter.discard { + // Route through basicWriter.Write so that the tee and discard semantics + // are honored (the fast ReaderFrom path below would bypass both, writing + // straight to the original ResponseWriter). basicWriter.Write already + // increments basicWriter.bytes, so we must NOT add n again here (that + // would double-count). n, err := io.Copy(&f.basicWriter, r) return n, err } diff --git a/vendor/github.com/go-chi/chi/v5/mux.go b/vendor/github.com/go-chi/chi/v5/mux.go index 3da7f3f990..37cd50043f 100644 --- a/vendor/github.com/go-chi/chi/v5/mux.go +++ b/vendor/github.com/go-chi/chi/v5/mux.go @@ -186,6 +186,12 @@ func (mx *Mux) Put(pattern string, handlerFn http.HandlerFunc) { mx.handle(mPUT, pattern, handlerFn) } +// Query adds the route `pattern` that matches a QUERY http method to +// execute the `handlerFn` http.HandlerFunc. +func (mx *Mux) Query(pattern string, handlerFn http.HandlerFunc) { + mx.handle(mQUERY, pattern, handlerFn) +} + // Trace adds the route `pattern` that matches a TRACE http method to // execute the `handlerFn` http.HandlerFunc. func (mx *Mux) Trace(pattern string, handlerFn http.HandlerFunc) { diff --git a/vendor/github.com/go-chi/chi/v5/tree.go b/vendor/github.com/go-chi/chi/v5/tree.go index 95f31d4fc5..74ff43db16 100644 --- a/vendor/github.com/go-chi/chi/v5/tree.go +++ b/vendor/github.com/go-chi/chi/v5/tree.go @@ -26,11 +26,17 @@ const ( mPATCH mPOST mPUT + mQUERY mTRACE ) var mALL = mCONNECT | mDELETE | mGET | mHEAD | - mOPTIONS | mPATCH | mPOST | mPUT | mTRACE + mOPTIONS | mPATCH | mPOST | mPUT | mQUERY | mTRACE + +// methodQuery is the HTTP QUERY method (RFC 10008), a safe, idempotent +// method that conveys a request body. It is defined here until net/http +// provides an equivalent constant, at which point this is a 1-1 swap. +const methodQuery = "QUERY" var methodMap = map[string]methodTyp{ http.MethodConnect: mCONNECT, @@ -41,6 +47,7 @@ var methodMap = map[string]methodTyp{ http.MethodPatch: mPATCH, http.MethodPost: mPOST, http.MethodPut: mPUT, + methodQuery: mQUERY, http.MethodTrace: mTRACE, } @@ -53,6 +60,7 @@ var reverseMethodMap = map[methodTyp]string{ mPATCH: http.MethodPatch, mPOST: http.MethodPost, mPUT: http.MethodPut, + mQUERY: methodQuery, mTRACE: http.MethodTrace, } diff --git a/vendor/modules.txt b/vendor/modules.txt index 09b4d234e7..346309b9f8 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -452,7 +452,7 @@ github.com/go-acme/lego/v4/challenge # github.com/go-asn1-ber/asn1-ber v1.5.8-0.20250403174932-29230038a667 ## explicit; go 1.13 github.com/go-asn1-ber/asn1-ber -# github.com/go-chi/chi/v5 v5.3.0 +# github.com/go-chi/chi/v5 v5.3.1 ## explicit; go 1.23 github.com/go-chi/chi/v5 github.com/go-chi/chi/v5/middleware