]> 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)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sun, 9 Jul 2023 15:25:08 +0000 (15:25 +0000)
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 ce9cb1af33bb6e6d8fc232ea00b968e2c37f69a1..527c26116da75f2d3db80f98a1deaecee7690336 100644 (file)
@@ -2054,8 +2054,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
 }