From 46aaf023713e140514c7b762be90faa5aa88fe9e Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Fri, 13 Sep 2019 16:00:03 -0600 Subject: encode: Fix bug where default status code was being written for small responses. See https://caddy.community/t/v2-permanent-redirect-prompt/6190?u=matt --- modules/caddyhttp/encode/encode.go | 3 --- 1 file changed, 3 deletions(-) (limited to 'modules') diff --git a/modules/caddyhttp/encode/encode.go b/modules/caddyhttp/encode/encode.go index 723b988..1838885 100644 --- a/modules/caddyhttp/encode/encode.go +++ b/modules/caddyhttp/encode/encode.go @@ -162,9 +162,6 @@ func (rw *responseWriter) Write(p []byte) (int, error) { if err != nil { return 0, err } - if rw.buf.Len() < rw.config.MinLength { - return len(p), nil - } rw.init() p = rw.buf.Bytes() defer func() { -- cgit v1.2.3