]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Cleanup pipeline handling on 1xx message sending
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 15 Nov 2015 13:42:41 +0000 (05:42 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 15 Nov 2015 13:42:41 +0000 (05:42 -0800)
src/client_side.cc

index 28542fadc680249b61a1bc9404d99a6e2a7eec45..6bb345db10e2e83766bca579a50638cdf3534f6b 100644 (file)
@@ -4539,6 +4539,7 @@ ConnStateData::finishDechunkingRequest(bool withSuccess)
     bodyParser = NULL;
 }
 
+// XXX: this is an HTTP/1-only operation
 void
 ConnStateData::sendControlMsg(HttpControlMsg msg)
 {
@@ -4547,9 +4548,8 @@ ConnStateData::sendControlMsg(HttpControlMsg msg)
         return;
     }
 
-    auto context = pipeline.front();
-    if (context != nullptr) {
-        context->writeControlMsg(msg); // will call msg.cbSuccess
+    if (!pipeline.empty()) {
+        pipeline.front()->writeControlMsg(msg); // will call msg.cbSuccess
         return;
     }