diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2019-09-13 16:00:03 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2019-09-13 16:00:03 -0600 |
commit | 46aaf023713e140514c7b762be90faa5aa88fe9e (patch) | |
tree | a65e5dbe654746a101665c772b27a4960dd033e5 /modules | |
parent | 3b80c505fbb57fbf6f6abc429cacdade2ac08dc9 (diff) |
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
Diffstat (limited to 'modules')
-rw-r--r-- | modules/caddyhttp/encode/encode.go | 3 |
1 files changed, 0 insertions, 3 deletions
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() { |