summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/encode/zstd
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-06-29 16:57:55 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-06-29 16:57:55 -0600
commitfee0b38b4842403a28d664385a1ff1075e8891d2 (patch)
treeab2561988c411e26155f742f3cb38d12461f1d42 /modules/caddyhttp/encode/zstd
parentd5ae3a4966288475025360f43917e9fae94148d7 (diff)
Fix encoder name bug; remove unused field in encode middleware struct
Diffstat (limited to 'modules/caddyhttp/encode/zstd')
-rw-r--r--modules/caddyhttp/encode/zstd/zstd.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/caddyhttp/encode/zstd/zstd.go b/modules/caddyhttp/encode/zstd/zstd.go
index 2bb8771..dbcc3ec 100644
--- a/modules/caddyhttp/encode/zstd/zstd.go
+++ b/modules/caddyhttp/encode/zstd/zstd.go
@@ -16,6 +16,10 @@ func init() {
// Zstd can create zstd encoders.
type Zstd struct{}
+// AcceptEncoding returns the name of the encoding as
+// used in the Accept-Encoding request headers.
+func (Zstd) AcceptEncoding() string { return "zstd" }
+
// NewEncoder returns a new gzip writer.
func (z Zstd) NewEncoder() encode.Encoder {
writer, _ := zstd.NewWriter(nil)