Display eCAP meta-information on Squid error-page

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Display eCAP meta-information on Squid error-page

Christof Gerber
Hi Squid users

I have a question concerning eCAP implementation in Squid 3.5.

My goal is to display data which is provided by an eCAP adapter on a Squid error-page. My primary goal is to achieve this with the eCAP transaction meta-information which is provided by the eCAP adapter with Adapter::Xaction::visitEachOption().

I know that with "adapt::<last_h" (1) this meta-information (options) can be logged to access.log. Is it somehow possible that Squid access these key-value pairs and hands it over to the Error page? Similar to "deny_info" tags (2) which ensures the availability of the URL (%U) etc. in the html code of the error-page.

The approach that the eCAP adapter would create the error-page and send it back to squid as response body instead of calling blockVirgin() (3) is known by me but this would only be the second choice if the approach in question is not possible.

References:
(1) http://www.squid-cache.org/Doc/config/logformat/
(2) http://www.squid-cache.org/Doc/config/deny_info/
(3) https://answers.launchpad.net/ecap/+faq/2516

Thanks in advance for your help.
Best

Christof

--
Christof Gerber

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Fwd: Display eCAP meta-information on Squid error-page

Christof Gerber
Hi Squid users

I have a question concerning eCAP implementation in Squid 3.5.

My goal is to display data which is provided by an eCAP adapter on a
Squid error-page. My primary goal is to achieve this with the eCAP
transaction meta-information which is provided by the eCAP adapter
with Adapter::Xaction::visitEachOption().

I know that with "adapt::<last_h" (1) this meta-information (options)
can be logged to access.log. Is it somehow possible that Squid access
these key-value pairs and hands it over to the Error page? Similar to
"deny_info" tags (2) which ensures the availability of the URL (%U)
etc. in the html code of the error-page.

The approach that the eCAP adapter would create the error-page and
send it back to squid as response body instead of calling
blockVirgin() (3) is known by me but this would only be the second
choice if the approach in question is not possible.

References:
(1) http://www.squid-cache.org/Doc/config/logformat/
(2) http://www.squid-cache.org/Doc/config/deny_info/
(3) https://answers.launchpad.net/ecap/+faq/2516

Thanks in advance for your help.
Best

Christof

--
Christof Gerber
Email: [hidden email]
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: Display eCAP meta-information on Squid error-page

Alex Rousskov
In reply to this post by Christof Gerber
On 09/27/2017 11:52 PM, Christof Gerber wrote:

> I have a question concerning eCAP implementation in Squid 3.5.

Actually, you do not :-). You have a question about using so called
annotations in Squid error pages. eCAP is just one of several annotation
sources in Squid. The other sources are ICAP services, helpers, and the
"note" directive in squid.conf.


> I know that with "adapt::<last_h" (1) this meta-information (options)
> can be logged to access.log.

FYI: It is best to use %note logformat %code for logging annotations.
The %adapt::<last_h code is meant for adaptation services debugging (and
to work around the current ICAP code lack of support for annotations).


> Is it somehow possible that Squid access
> these key-value pairs and hands it over to the Error page?

Unfortunately, Squid error page generation code is unaware of
annotations -- there is currently no code to add them to the generated
error page. Supporting %note and probably all other access.log
formatting codes (via some common namespace like %logformat::note) would
be generally useful IMO.

http://wiki.squid-cache.org/SquidFaq/AboutSquid#How_to_add_a_new_Squid_feature.2C_enhance.2C_of_fix_something.3F

Alex.
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users