From a3570f22d06ce2aa3bc6bf20784b79243db935e8 Mon Sep 17 00:00:00 2001
From: Lizan Zhou <zlizan@google.com>
Date: Mon, 5 Sep 2016 13:29:17 +0900
Subject: [PATCH] Fix grpc_byte_buffer_copy to copy compression algorithm

---
 src/core/lib/surface/byte_buffer.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/core/lib/surface/byte_buffer.c b/src/core/lib/surface/byte_buffer.c
index a093a37af3..054a6e6c58 100644
--- a/src/core/lib/surface/byte_buffer.c
+++ b/src/core/lib/surface/byte_buffer.c
@@ -72,8 +72,9 @@ grpc_byte_buffer *grpc_raw_byte_buffer_from_reader(
 grpc_byte_buffer *grpc_byte_buffer_copy(grpc_byte_buffer *bb) {
   switch (bb->type) {
     case GRPC_BB_RAW:
-      return grpc_raw_byte_buffer_create(bb->data.raw.slice_buffer.slices,
-                                         bb->data.raw.slice_buffer.count);
+      return grpc_raw_compressed_byte_buffer_create(
+          bb->data.raw.slice_buffer.slices, bb->data.raw.slice_buffer.count,
+          bb->data.raw.compression);
   }
   GPR_UNREACHABLE_CODE(return NULL);
 }
-- 
GitLab