瀏覽代碼

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
Stefan Eissing 11 月之前
父節點
當前提交
def99e011e
共有 2 個文件被更改,包括 0 次插入8 次删除
  1. 0 2
      lib/c-hyper.c
  2. 0 6
      tests/data/test1554

+ 0 - 2
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));

+ 0 - 6
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