aboutsummaryrefslogtreecommitdiffhomepage
path: root/http
diff options
context:
space:
mode:
Diffstat (limited to 'http')
-rw-r--r--http/response/builder.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/http/response/builder.go b/http/response/builder.go
index f17c62e..b8ba1ef 100644
--- a/http/response/builder.go
+++ b/http/response/builder.go
@@ -8,6 +8,7 @@ import (
"compress/flate"
"compress/gzip"
"fmt"
+ "io"
"net/http"
"strings"
"time"
@@ -84,6 +85,10 @@ func (b *Builder) Write() {
b.compress([]byte(v))
case error:
b.compress([]byte(v.Error()))
+ case io.Reader:
+ // Compression not implemented in this case
+ b.writeHeaders()
+ io.Copy(b.w, v)
}
}