From: Stefan Eissing Date: Mon, 26 Jun 2023 09:51:43 +0000 (+0200) Subject: hyper: fix EOF handling on input X-Git-Tag: curl-8_2_0~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=def99e011e88d61a4157863537378ca9c59a79e0;p=thirdparty%2Fcurl.git hyper: fix EOF handling on input We ran out of disc space due to an infinite loop with debug logging Fixes #11377 Closes #11385 Reported-by: Dan Fandrich --- diff --git a/lib/c-hyper.c b/lib/c-hyper.c index 52e07797c5..c29983c0b2 100644 --- a/lib/c-hyper.c +++ b/lib/c-hyper.c @@ -73,8 +73,6 @@ size_t Curl_hyper_recv(void *userp, hyper_context *ctx, DEBUGF(infof(data, "Curl_hyper_recv(%zu)", buflen)); result = Curl_read(data, conn->sockfd, (char *)buf, buflen, &nread); - if(!result && !nread) - result = CURLE_AGAIN; if(result == CURLE_AGAIN) { /* would block, register interest */ DEBUGF(infof(data, "Curl_hyper_recv(%zu) -> EAGAIN", buflen)); diff --git a/tests/data/test1554 b/tests/data/test1554 index 812a2c8c02..c16195c17f 100644 --- a/tests/data/test1554 +++ b/tests/data/test1554 @@ -69,12 +69,6 @@ run 1: foobar and so on fun! <- Mutex unlock -> Mutex lock <- Mutex unlock -%if hyper --> Mutex lock -<- Mutex unlock --> Mutex lock -<- Mutex unlock -%endif run 1: foobar and so on fun! -> Mutex lock <- Mutex unlock