From def99e011e88d61a4157863537378ca9c59a79e0 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Mon, 26 Jun 2023 11:51:43 +0200 Subject: [PATCH] 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 --- lib/c-hyper.c | 2 -- tests/data/test1554 | 6 ------ 2 files changed, 8 deletions(-) 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