Browse Source

Fix GZip pool calibration

DarthSim 6 năm trước cách đây
mục cha
commit
c21e211c5a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      server.go

+ 1 - 1
server.go

@@ -137,7 +137,7 @@ func respondWithImage(ctx context.Context, reqID string, r *http.Request, rw htt
 		rw.Header().Set("Content-Length", strconv.Itoa(buf.Len()))
 
 		rw.WriteHeader(200)
-		buf.WriteTo(rw)
+		rw.Write(buf.Bytes())
 	} else {
 		rw.Header().Set("Content-Length", strconv.Itoa(len(data)))
 		rw.WriteHeader(200)