aboutsummaryrefslogtreecommitdiff
path: root/pkg/ext/compression.go
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-06-08 00:01:44 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-06-08 00:01:44 +0200
commit6079b1d963f34ada5c4b25363f2319901e283936 (patch)
treef7f93616eb3dacfcebee486fe7542ec3adfb3950 /pkg/ext/compression.go
parente9098e00fb6339b759df5b0df2e086cef8a7ce83 (diff)
downloadcerrado-6079b1d963f34ada5c4b25363f2319901e283936.tar.gz
cerrado-6079b1d963f34ada5c4b25363f2319901e283936.tar.bz2
cerrado-6079b1d963f34ada5c4b25363f2319901e283936.zip
feat: Add error handling
Diffstat (limited to 'pkg/ext/compression.go')
-rw-r--r--pkg/ext/compression.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/ext/compression.go b/pkg/ext/compression.go
index 92144b8..57ad49a 100644
--- a/pkg/ext/compression.go
+++ b/pkg/ext/compression.go
@@ -24,7 +24,7 @@ type CompressionResponseWriter struct {
compressWriter io.Writer
}
-func Compress(next func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) {
+func Compress(next http.HandlerFunc) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
if accept, ok := r.Header["Accept-Encoding"]; ok {
if compress, algo := GetCompressionWriter(u.FirstOrZero(accept), w); algo != "" {