]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
c-hyper: handle body on HYPER_TASK_EMPTY
authorJacob Hoffman-Andrews <github@hoffman-andrews.com>
Sat, 15 May 2021 03:52:17 +0000 (20:52 -0700)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 15 May 2021 22:48:14 +0000 (00:48 +0200)
Some of the time, we get a HYPER_TASK_EMPTY response before the status
line, headers, and body have been read. Previously, that would cause us
to poll again, leading to a 1 second timeout.

The HYPER_TASK_EMPTY docs say:

   The value of this task is null (does not imply an error).

So, if we receive a HYPER_TASK_EMPTY, continue on with processing the
response.

Reported-by: Kevin Burke
Fixes #7064
Closes #7070

lib/c-hyper.c

index 5908f6e1f73c1b7de338d884e0974946c6f3f35e..81f589eb9e6fcee917e2ab8c8be5518ece9ae1d8 100644 (file)
@@ -331,7 +331,7 @@ CURLcode Curl_hyper_stream(struct Curl_easy *data,
       infof(data, "hyperstream is done!\n");
       break;
     }
-    else if(t != HYPER_TASK_RESPONSE) {
+    else if(t != HYPER_TASK_RESPONSE && t != HYPER_TASK_EMPTY) {
       *didwhat = KEEP_RECV;
       break;
     }