From a0a5f4f93e77ae6d17708081036f5a888715f4a3 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 27 May 2015 00:33:24 +0900 Subject: [PATCH] tests: Break if all compressed header input processed in nghttp2_buf --- tests/nghttp2_test_helper.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/nghttp2_test_helper.c b/tests/nghttp2_test_helper.c index a9cb10c7..b062276a 100644 --- a/tests/nghttp2_test_helper.c +++ b/tests/nghttp2_test_helper.c @@ -192,6 +192,10 @@ ssize_t inflate_hd(nghttp2_hd_inflater *inflater, nva_out *out, if (inflate_flags & NGHTTP2_HD_INFLATE_FINAL) { break; } + if ((inflate_flags & NGHTTP2_HD_INFLATE_EMIT) == 0 && + nghttp2_buf_len(&bp) == 0) { + break; + } } }