Which HTTP messages are considered for adaptation?

Asked by Bob

Question 277273 documents two typical adaptation chains:

------------------------------
request path: HTTP client -> [proxy -> REQMOD1 -> proxy -> REQMOD2 -> proxy] -> HTTP server
response path: HTTP server -> [proxy -> RESPMOD1 -> proxy -> RESPMOD2 -> proxy] -> HTTP client
------------------------------

If I register an adapter in the chains (both or just one?), is it triggered each time when the host application receives a http request or a http response?

Question information

Language:
English Edit question
Status:
Solved
For:
eCAP Edit question
Assignee:
No assignee Edit question
Solved by:
Alex Rousskov
Solved:
Last query:
Last reply:
Revision history for this message
Best Alex Rousskov (rousskov) said :
#1

Short answer: Which HTTP messages are considered for adaptation and which eCAP service(s) are used for that adaptation depends on the host application configuration.

Explanation:

The adapter (the loadable module) registers Service objects. The eCAP service registration API does not specify how the objects are used by the host application, but the host application normally maps Service objects to various adaptation vectoring points. How that mapping is done, and which points are supported, depends on the host application. In general, REQMOD vectoring points receive HTTP requests and RESPMOD vectoring points receive HTTP responses (plus request headers as a constant "cause" of the response).

If you deal with an HTTP proxy, you may want to read RFC 3507 to learn more about the overall adaptation architecture in HTTP proxies. ICAP and eCAP share the same high-level adaptation principles.

For example, Squid maps Service objects to vectoring points using ecap_service directives in squid.conf. The mapping is done using Service URIs (the "uri" parameter of the ecap_service directive). IIRC, Squid requires that each ecap_service line has a unique service URI. Which HTTP messages are actually sent to a which service depends on the ACL-driven adaptation_access rules in squid.conf. If you have Squid configuration questions, please post them on Squid support forums and not here.

Revision history for this message
Bob (362061693-k) said :
#2

well, it seems that I should learn some knowledge about squid and the RFC 3507 in order to write eCAP adapters.

Revision history for this message
Bob (362061693-k) said :
#3

Thanks Alex Rousskov, that solved my question.