9#ifndef SQUID_SRC_ADAPTATION_ICAP_MODXACT_H
10#define SQUID_SRC_ADAPTATION_ICAP_MODXACT_H
42 void expect(int64_t aSize);
48 uint64_t
size()
const;
91 void enable(
size_t anAdvertisedSize);
185 void start()
override;
256 void disableBypass(
const char *reason,
bool includeGroupBypass);
269 void stopParsing(
const bool checkUnparsedData =
true);
282 bool parsePart(Part *part,
const char *description);
void error(char *format,...)
squidaio_request_t * head
handles ICAP-specific chunk extensions supported by Squid
static const SBuf UseOriginalBodyName
int64_t useOriginalBody_
the value of the parsed use-original-body chunk extension (or -1)
bool sawUseOriginalBody() const
void parse(Tokenizer &tok, const SBuf &extName) override
extracts and then interprets (or ignores) the extension value
uint64_t useOriginalBody() const
void start() override
called by AsyncStart; do not call directly
CBDATA_CHILD(ModXactLauncher)
AccessLogEntry::Pointer al
void updateHistory(bool start)
starts or stops transaction accounting in ICAP history
Xaction * createXaction() override
bool readyForUob
got a 206 response and expect a use-origin-body
bool waitedForService
true if was queued at least once
enum Adaptation::Icap::ModXact::State::Sending sending
bool doneConsumingVirgin() const
bool parsingHeaders() const
enum Adaptation::Icap::ModXact::State::Parsing parsing
enum Adaptation::Icap::ModXact::State::Writing writing
const char * virginContentData(const VirginBodyAct &act) const
void openChunk(MemBuf &buf, size_t chunkSize, bool ieof)
void noteMoreBodyDataAvailable(BodyPipe::Pointer) override
int64_t replyHttpHeaderSize
void start() override
called by AsyncStart; do not call directly
void packHead(MemBuf &httpBuf, const Http::Message *head)
TrailerParser * trailerParser
void stopWriting(bool nicely)
void handleCommWroteHeaders()
void decideOnParsingBody()
void noteBodyProductionEnded(BodyPipe::Pointer) override
Http1::TeChunkedParser * bodyParser
bool doneAll() const override
whether positive goal has been reached
void makeAllowHeader(MemBuf &buf)
void clearError() override
clear stored error details, if any; used for retries/repeats
void maybeAllocateHttpMsg()
void writeSomeBody(const char *label, size_t size)
void callException(const std::exception &e) override
called when the job throws during an async call
bool expectHttpBody() const
whether ICAP response header indicates HTTP body presence
bool parseHead(Http::Message *head)
bool fillVirginHttpHeader(MemBuf &) const override
void stopSending(bool nicely)
bool virginBodyEndReached(const VirginBodyAct &act) const
bool gotEncapsulated(const char *section) const
AccessLogEntry::Pointer alMaster
Master transaction AccessLogEntry.
void updateSources()
Update the Http::Message sources.
VirginBodyAct virginBodySending
void stopParsing(const bool checkUnparsedData=true)
bool parsePart(Part *part, const char *description)
void startShoveling() override
starts sending/receiving ICAP messages
void estimateVirginBody()
void backup(const MemBuf &buf)
void detailError(const ErrorDetail::Pointer &errDetail) override
record error detail in the virgin request if possible
void handleUnknownScode()
AccessLogEntry::Pointer masterLogEntry() override
The master transaction log entry.
int adaptHistoryId
adaptation history slot reservation
class Adaptation::Icap::ModXact::State state
void closeChunk(MemBuf &buf)
void addLastRequestChunk(MemBuf &buf)
void disableBypass(const char *reason, bool includeGroupBypass)
VirginBodyAct virginBodyWriting
bool canBackupEverything() const
void prepBackup(size_t expectedSize)
bool expectHttpHeader() const
whether ICAP response header indicates HTTP header presence
void noteBodyConsumerAborted(BodyPipe::Pointer) override
void handle206PartialContent()
size_t virginContentSize(const VirginBodyAct &act) const
void handleCommRead(size_t size) override
void fillDoneStatus(MemBuf &buf) const override
void prepPartialBodyEchoing(uint64_t pos)
int64_t replyHttpBodySize
bool expectIcapTrailers() const
whether ICAP response header indicates ICAP trailers presence
void fillPendingStatus(MemBuf &buf) const override
void noteMoreBodySpaceAvailable(BodyPipe::Pointer) override
void makeRequestHeaders(MemBuf &buf)
void handleCommWroteBody()
bool doneWriting() const override
ChunkExtensionValueParser extensionParser
void encapsulateHead(MemBuf &icapBuf, const char *section, MemBuf &httpBuf, const Http::Message *head)
void finishNullOrEmptyBodyPreview(MemBuf &buf)
void noteBodyProducerAborted(BodyPipe::Pointer) override
bool doneReading() const override
void makeAdaptedBodyPipe(const char *what)
void makeUsernameHeader(const HttpRequest *request, MemBuf &buf)
void handleCommWrote(size_t size) override
void finalizeLogInfo() override
void handle204NoContent()
void decideWritingAfterPreview(const char *previewKind)
determine state.writing after we wrote the entire preview
void noteServiceAvailable()
const HttpRequest & virginRequest() const
locates the request, either as a cause or as a virgin message itself
void enable(size_t anAdvertisedSize)
void wrote(size_t size, bool wroteEof)
enum Adaptation::Icap::Preview::State theState
void expect(int64_t aSize)
Parses and stores ICAP trailer header block.
size_t hdr_sz
parsed trailer size if parse() was successful
bool parse(const char *buf, int len, int atEnd, Http::StatusCode *error)
void progress(size_t size)
common parts of HttpRequest and HttpReply
::Parser::Tokenizer Tokenizer