]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
hyper: fix status_line() return code
authorDaniel Stenberg <daniel@haxx.se>
Thu, 10 Mar 2022 15:55:54 +0000 (16:55 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 10 Mar 2022 16:35:46 +0000 (17:35 +0100)
Detected while working on #7708 that happened to trigger an error here
with a new test case.

Closes #8572

lib/c-hyper.c

index 8015de25bca815ac21e879e56772579f5a966ae7..b795a47fed2ae16af46cc29a54fc2b3df7fb67eb 100644 (file)
@@ -293,10 +293,8 @@ static CURLcode status_line(struct Curl_easy *data,
       writetype |= CLIENTWRITE_BODY;
     result = Curl_client_write(data, writetype,
                                Curl_dyn_ptr(&data->state.headerb), len);
-    if(result) {
-      data->state.hresult = CURLE_ABORTED_BY_CALLBACK;
-      return HYPER_ITER_BREAK;
-    }
+    if(result)
+      return result;
   }
   data->info.header_size += (long)len;
   data->req.headerbytecount += (long)len;