ModXact.h
Go to the documentation of this file.
132 uint64_t useOriginalBody() const { assert(sawUseOriginalBody()); return static_cast<uint64_t>(useOriginalBody_); }
146 ModXact(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, ServiceRep::Pointer &s);
285 void encapsulateHead(MemBuf &icapBuf, const char *section, MemBuf &httpBuf, const Http::Message *head);
383 ModXactLauncher(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, Adaptation::ServicePointer s);
void error(char *format,...)
handles ICAP-specific chunk extensions supported by Squid
Definition: ModXact.h:126
static const SBuf UseOriginalBodyName
Definition: ModXact.h:135
int64_t useOriginalBody_
the value of the parsed use-original-body chunk extension (or -1)
Definition: ModXact.h:138
bool sawUseOriginalBody() const
Definition: ModXact.h:131
void parse(Tokenizer &tok, const SBuf &extName) override
extracts and then interprets (or ignores) the extension value
Definition: ModXact.cc:2080
uint64_t useOriginalBody() const
Definition: ModXact.h:132
Definition: InOut.h:25
Definition: Launcher.h:48
Definition: ModXact.h:379
CBDATA_CHILD(ModXactLauncher)
void updateHistory(bool start)
starts or stops transaction accounting in ICAP history
Definition: ModXact.cc:2051
Xaction * createXaction() override
Definition: ModXact.cc:2036
ModXactLauncher(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, Adaptation::ServicePointer s)
Definition: ModXact.cc:2026
Definition: ModXact.h:326
enum Adaptation::Icap::ModXact::State::Sending sending
bool allowedPostview204
Definition: ModXact.h:334
bool allowedPostview206
Definition: ModXact.h:335
bool doneConsumingVirgin() const
Definition: ModXact.h:344
bool parsingHeaders() const
Definition: ModXact.h:354
enum Adaptation::Icap::ModXact::State::Parsing parsing
enum Adaptation::Icap::ModXact::State::Writing writing
Definition: ModXact.h:142
const char * virginContentData(const VirginBodyAct &act) const
Definition: ModXact.cc:416
void openChunk(MemBuf &buf, size_t chunkSize, bool ieof)
Definition: ModXact.cc:376
void noteMoreBodyDataAvailable(BodyPipe::Pointer) override
Definition: ModXact.cc:1233
void packHead(MemBuf &httpBuf, const Http::Message *head)
Definition: ModXact.cc:1631
void stopReceiving()
void handleCommWroteHeaders()
Definition: ModXact.cc:218
void noteBodyProductionEnded(BodyPipe::Pointer) override
Definition: ModXact.cc:1242
void makeAllowHeader(MemBuf &buf)
Definition: ModXact.cc:1522
void clearError() override
clear stored error details, if any; used for retries/repeats
Definition: ModXact.cc:2007
void maybeAllocateHttpMsg()
Definition: ModXact.cc:730
void writeSomeBody(const char *label, size_t size)
Definition: ModXact.cc:319
void callException(const std::exception &e) override
called when the job throws during an async call
Definition: ModXact.cc:665
bool expectHttpBody() const
whether ICAP response header indicates HTTP body presence
Definition: ModXact.cc:1123
CBDATA_CHILD(ModXact)
bool fillVirginHttpHeader(MemBuf &) const override
Definition: ModXact.cc:1985
bool virginBodyEndReached(const VirginBodyAct &act) const
Definition: ModXact.cc:395
bool gotEncapsulated(const char *section) const
Definition: ModXact.cc:1813
VirginBodyAct virginBodySending
Definition: ModXact.h:299
void stopParsing(const bool checkUnparsedData=true)
Definition: ModXact.cc:1213
bool parsePart(Part *part, const char *description)
Definition: ModXact.cc:1091
void backup(const MemBuf &buf)
void detailError(const ErrorDetail::Pointer &errDetail) override
record error detail in the virgin request if possible
Definition: ModXact.cc:1995
AccessLogEntry::Pointer masterLogEntry() override
The master transaction log entry.
Definition: ModXact.h:182
class Adaptation::Icap::ModXact::State state
void addLastRequestChunk(MemBuf &buf)
Definition: ModXact.cc:369
void disableBypass(const char *reason, bool includeGroupBypass)
Definition: ModXact.cc:717
VirginBodyAct virginBodyWriting
Definition: ModXact.h:298
bool canBackupEverything() const
Definition: ModXact.cc:1697
void prepBackup(size_t expectedSize)
bool expectHttpHeader() const
whether ICAP response header indicates HTTP header presence
Definition: ModXact.cc:1118
void noteBodyConsumerAborted(BodyPipe::Pointer) override
Definition: ModXact.cc:1279
void handle206PartialContent()
Definition: ModXact.cc:929
ModXact(Http::Message *virginHeader, HttpRequest *virginCause, AccessLogEntry::Pointer &alp, ServiceRep::Pointer &s)
Definition: ModXact.cc:54
size_t virginContentSize(const VirginBodyAct &act) const
Definition: ModXact.cc:404
void handleCommRead(size_t size) override
Definition: ModXact.cc:567
void fillDoneStatus(MemBuf &buf) const override
Definition: ModXact.cc:1788
void prepPartialBodyEchoing(uint64_t pos)
Definition: ModXact.cc:1022
bool expectIcapTrailers() const
whether ICAP response header indicates ICAP trailers presence
Definition: ModXact.cc:1128
void fillPendingStatus(MemBuf &buf) const override
Definition: ModXact.cc:1748
void noteMoreBodySpaceAvailable(BodyPipe::Pointer) override
Definition: ModXact.cc:1268
void makeRequestHeaders(MemBuf &buf)
Definition: ModXact.cc:1382
ChunkExtensionValueParser extensionParser
Definition: ModXact.h:323
void encapsulateHead(MemBuf &icapBuf, const char *section, MemBuf &httpBuf, const Http::Message *head)
Definition: ModXact.cc:1584
void finishNullOrEmptyBodyPreview(MemBuf &buf)
Definition: ModXact.cc:1734
void noteBodyProducerAborted(BodyPipe::Pointer) override
Definition: ModXact.cc:1255
void makeAdaptedBodyPipe(const char *what)
Definition: ModXact.cc:1862
void makeUsernameHeader(const HttpRequest *request, MemBuf &buf)
Definition: ModXact.cc:1555
void handleCommWrote(size_t size) override
Definition: ModXact.cc:208
void finalizeLogInfo() override
Definition: ModXact.cc:1315
void decideWritingAfterPreview(const char *previewKind)
determine state.writing after we wrote the entire preview
Definition: ModXact.cc:292
void noteServiceAvailable()
Definition: ModXact.cc:168
const HttpRequest & virginRequest() const
locates the request, either as a cause or as a virgin message itself
Definition: ModXact.cc:386
Definition: ModXact.h:87
enum Adaptation::Icap::Preview::State theState
Definition: ModXact.h:38
Parses and stores ICAP trailer header block.
Definition: ModXact.h:111
bool parse(const char *buf, int len, int atEnd, Http::StatusCode *error)
Definition: ModXact.cc:2068
Definition: ModXact.h:61
Definition: Xaction.h:44
Definition: BodyPipe.h:43
Definition: BodyPipe.h:23
Definition: HttpHeader.h:75
Definition: HttpRequest.h:49
::Parser::Tokenizer Tokenizer
Definition: TeChunkedParser.h:32
Definition: TeChunkedParser.h:52
Definition: MemBuf.h:24
Definition: AccessCheck.h:25
Definition: parse.c:160