]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 5187: Work around REQMOD satisfaction regression (#1400)
authorAndrew Novikov <as.asaw@gmail.com>
Sun, 9 Jul 2023 02:05:56 +0000 (02:05 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Tue, 25 Jul 2023 14:59:56 +0000 (02:59 +1200)
Commit ba3fe8d broke ICAP REQMOD satisfaction transactions. In some
cases, this workaround may resurrect Squid Bug 5187. Triage available at
https://bugs.squid-cache.org/show_bug.cgi?id=5187#c6

src/client_side_request.cc

index dc2c3d1a48e66c6c965ce6fb34fbed5c06359d48..8affab7b2f964a259e135107678d0a8ae2e4f48a 100644 (file)
@@ -2057,8 +2057,13 @@ ClientHttpRequest::noteMoreBodyDataAvailable(BodyPipe::Pointer)
         bpc.checkIn();
     }
 
-    if (adaptedBodySource->exhausted())
+    if (adaptedBodySource->exhausted()) {
+        // XXX: Setting receivedWholeAdaptedReply here is a workaround for a
+        // regression, as described in https://bugs.squid-cache.org/show_bug.cgi?id=5187#c6
+        receivedWholeAdaptedReply = true;
+        debugs(85, DBG_IMPORTANT, "WARNING: Squid bug 5187 workaround triggered");
         endRequestSatisfaction();
+    }
     // else wait for more body data
 }