]> git.ipfire.org Git - thirdparty/squid.git/commit - src/adaptation/icap/ModXact.cc
Support libecap::host::xaction::blockVirgin() API, serving ERR_ACCESS_DENIED.
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 15 Dec 2010 17:52:35 +0000 (10:52 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Wed, 15 Dec 2010 17:52:35 +0000 (10:52 -0700)
commit3af10ac07bfc86881f6e7437faca4ff5fbb550ec
tree34eeb73a9e17e9608f86c6a27adc5de627fd6b28
parenta45511e1cfc8221dcb249b5ef6f3cc203116ccb2
Support libecap::host::xaction::blockVirgin() API, serving ERR_ACCESS_DENIED.

deny_info logic is supported for these blocked responses, with the ACL name
replaced by the adaptation service name. This allows eCAP adapters to focus on
adaptation and blocking logic while letting Squid to serve a configurable
block message, with language negotiation and such.

Merged noteAdaptationAnswer(msg) and noteAdaptationQueryAbort(bool) into
noteAdaptationAnswer(answer). The Adaptation::Answer class manages all
currently supported adaptation decisions: forward the adapted message, block
user access to the virgin response, and bypassable or fatal error.

This "single answer hook" design allows us to add more information to adaption
answers without rewriting all the code that forwards those answers to the
adaptation initiator. We still often use multiple methods to handle multiple
answer categories, but that "forking" is optional and the decision to fork is
made locally, inside each answer recepient, reducing the overall code
complexity.

Also fixed a few virgin body handling corner cases that led to unnecessary
exceptions in Adaptation::Ecap::XactionRep despite correct adapter behavior.
21 files changed:
src/Server.cc
src/Server.h
src/adaptation/Initiate.cc
src/adaptation/Initiate.h
src/adaptation/Initiator.cc
src/adaptation/Initiator.h
src/adaptation/Iterator.cc
src/adaptation/Iterator.h
src/adaptation/ecap/XactionRep.cc
src/adaptation/ecap/XactionRep.h
src/adaptation/forward.h
src/adaptation/icap/Launcher.cc
src/adaptation/icap/Launcher.h
src/adaptation/icap/ModXact.cc
src/adaptation/icap/OptXact.cc
src/adaptation/icap/ServiceRep.cc
src/adaptation/icap/ServiceRep.h
src/cf.data.pre
src/client_side_request.cc
src/client_side_request.h
src/err_detail_type.h