@marcel91200 / caddy Mirror · read-only / commits / 46aaf023
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 14, 05:15 UTC

encode: Fix bug where default status code was being written for small responses.

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

Matthew Holt committed Sep 13, 2019 at 16:00 UTC 46aaf023713e140514c7b762be90faa5aa88fe9e
1 file changed -3
modules/caddyhttp/encode/encode.go
-3
@@ -162,9 +162,6 @@ func (rw *responseWriter) Write(p []byte) (int, error) {
162 if err != nil {
163 return 0, err
164 }
165 - if rw.buf.Len() < rw.config.MinLength {
166 - return len(p), nil
167 - }
165 rw.init()
166 p = rw.buf.Bytes()
167 defer func() {