]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/Pipeline.cc
2 * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
10 * DEBUG: section 33 Client Request Pipeline
13 #include "anyp/PortCfg.h"
14 #include "client_side.h"
16 #include "http/Stream.h"
20 Pipeline::add(const Http::StreamPointer
&c
)
22 requests
.push_back(c
);
24 debugs(33, 3, "Pipeline " << (void*)this << " add request " << nrequests
<< ' ' << c
);
28 Pipeline::front() const
30 if (requests
.empty()) {
31 debugs(33, 3, "Pipeline " << (void*)this << " empty");
32 return Http::StreamPointer();
35 debugs(33, 3, "Pipeline " << (void*)this << " front " << requests
.front());
36 return requests
.front();
40 Pipeline::back() const
42 if (requests
.empty()) {
43 debugs(33, 3, "Pipeline " << (void*)this << " empty");
44 return Http::StreamPointer();
47 debugs(33, 3, "Pipeline " << (void*)this << " back " << requests
.back());
48 return requests
.back();
52 Pipeline::popMe(const Http::StreamPointer
&which
)
57 debugs(33, 3, "Pipeline " << (void*)this << " drop " << requests
.front());
58 // in reality there may be multiple contexts doing processing in parallel.
59 // XXX: pipeline still assumes HTTP/1 FIFO semantics are obeyed.
60 assert(which
== requests
.front());