]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http2: always EXPIRE_RUN_NOW unpaused http/2 transfers
authorStefan Eissing <stefan@eissing.org>
Mon, 24 Apr 2023 10:50:44 +0000 (12:50 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 25 Apr 2023 15:50:53 +0000 (17:50 +0200)
- just increasing the http/2 flow window does not necessarily
  make a server send new data. It may already have exhausted
  the window before

Closes #11005

lib/http2.c

index 39b80a1bf494de52b3775629a122f60dbba58e65..726f5a64b87b8ed54048a38e9439166d97e527bc 100644 (file)
@@ -2210,6 +2210,15 @@ static CURLcode http2_data_pause(struct Curl_cfilter *cf,
     if(result)
       return result;
 
+    if(!pause) {
+      /* Unpausing a h2 transfer, requires it to be run again. The server
+       * may send new DATA on us increasing the flow window, and it may
+       * not. We may have already buffered and exhausted the new window
+       * by operating on things in flight during the handling of other
+       * transfers. */
+      drain_stream(cf, data, stream);
+      Curl_expire(data, 0, EXPIRE_RUN_NOW);
+    }
     DEBUGF(infof(data, "Set HTTP/2 window size to %u for stream %u",
                  window, stream->id));