]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
c-hpyer: fix handling of zero-byte chunk from hyper
authorJacob Hoffman-Andrews <github@hoffman-andrews.com>
Sat, 24 Apr 2021 03:24:30 +0000 (20:24 -0700)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 25 Apr 2021 12:11:21 +0000 (14:11 +0200)
Closes #6951

lib/c-hyper.c

index 5d370d7bdaabeb68d437ff7a8811e2049371c3e5..a7bee08c46b1d8c298eccfc7e31ad086239e7384 100644 (file)
@@ -175,6 +175,8 @@ static int hyper_body_chunk(void *userdata, const hyper_buf *chunk)
   }
   if(k->ignorebody)
     return HYPER_ITER_CONTINUE;
+  if(0 == len)
+    return HYPER_ITER_CONTINUE;
   Curl_debug(data, CURLINFO_DATA_IN, buf, len);
   if(!data->set.http_ce_skip && k->writer_stack)
     /* content-encoded data */