]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http2: fix in h2 proxy tunnel: progress in ingress on sending
authorStefan Eissing <stefan@eissing.org>
Thu, 27 Jul 2023 10:59:03 +0000 (12:59 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 27 Jul 2023 15:00:38 +0000 (17:00 +0200)
- depending on what is tunneled, the proxy may never get invoked for
  receiving data explicitly. Not progressing ingress may lead to stalls
  due to missed WINDOW_UPDATEs.

CI:
- add a chache for building mod_h2

Closes #11527

.github/workflows/ngtcp2-linux.yml
lib/cf-h2-proxy.c

index d14872c93ca06403005884c4015926e268daef12..186fd5a6061feee068804f8c2d1105cd71666844 100644 (file)
@@ -158,12 +158,27 @@ jobs:
         make install
       name: 'install nghttp2'
 
-    - run: |
-        git clone --quiet --depth=1 -b master https://github.com/icing/mod_h2
+    - name: cache mod_h2
+      uses: actions/cache@v3
+      id: cache-mod_h2
+      env:
+        cache-name: cache-mod_h2
+      with:
+        path: /home/runner/mod_h2
+        key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.mod_h2-version }}
+
+    - if: steps.cache-mod_h2.outputs.cache-hit != 'true'
+      run: |
+        cd $HOME
+        git clone --quiet --depth=1 -b  ${{ env.mod_h2-version }} https://github.com/icing/mod_h2
         cd mod_h2
         autoreconf -fi
         ./configure
         make
+      name: 'build mod_h2'
+
+    - run: |
+        cd $HOME/mod_h2
         sudo make install
       name: 'install mod_h2'
 
index f6acfc520255b9362d8fa22bcfd3a01d56c725b7..dd2c00d51ab3c12dcb8fb7218bceb61234b06513 100644 (file)
@@ -1309,6 +1309,13 @@ static ssize_t cf_h2_proxy_send(struct Curl_cfilter *cf,
     }
   }
 
+  result = proxy_h2_progress_ingress(cf, data);
+  if(result) {
+    *err = result;
+    nwritten = -1;
+    goto out;
+  }
+
   /* Call the nghttp2 send loop and flush to write ALL buffered data,
    * headers and/or request body completely out to the network */
   result = proxy_h2_progress_egress(cf, data);