mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-18 13:40:16 -04:00
Adjustments from Weidi's review
This commit is contained in:
@@ -405,11 +405,6 @@ func (rw *responseWriter) ReadFrom(r io.Reader) (int64, error) {
|
||||
// Close writes any remaining buffered response and
|
||||
// deallocates any active resources.
|
||||
func (rw *responseWriter) Close() error {
|
||||
if caddyhttp.ResponseWriterHijacked(rw.ResponseWriter) {
|
||||
rw.releaseEncoder()
|
||||
return nil
|
||||
}
|
||||
|
||||
// didn't write, probably head request
|
||||
if !rw.wroteHeader {
|
||||
cl, err := strconv.Atoi(rw.Header().Get("Content-Length"))
|
||||
|
||||
Reference in New Issue
Block a user