summaryrefslogtreecommitdiff
path: root/modules/caddyhttp
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-09-13 16:00:03 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-09-13 16:00:03 -0600
commit46aaf023713e140514c7b762be90faa5aa88fe9e (patch)
treea65e5dbe654746a101665c772b27a4960dd033e5 /modules/caddyhttp
parent3b80c505fbb57fbf6f6abc429cacdade2ac08dc9 (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/caddyhttp')
-rw-r--r--modules/caddyhttp/encode/encode.go3
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() {