[squid-dev] StoeiD and ICAP services callouts, when it happens?

Eliezer Croitoru eliezer at ngtech.co.il
Thu Jul 12 20:47:10 UTC 2018


I tried it both on access logs and store_id_extras.
In the access log I am receiving this:
....ICAP-Header-Test: "Connection: close\r\nDate: Thu, 12 Jul 2018 20:42:04 GMT\r\nEncapsulated: req-hdr=0, null-body=1189\r\nIstag: YTGV-Predictor\r\nService: YouTube GoogleVideo Predictor ICAP serivce\r\n "

But on store_id_extras I am receiving for the same logformat ie
store_id_extras "%adapt::<last_h"
"... -"

Now I'm not sure if I'm doing something wrong or it's something else.
>From the access.log it seems that I am doing things the right way but from the store_id helper "input" it seems that something is wrong.

I tried to add both a custom header to the request with a 204(GET only..) and also tried the same by adding an ICAP response header.
(the ICAP response header was not injected in the output above)

Eliezer

----
Eliezer Croitoru
Linux System Administrator
Mobile: +972-5-28704261
Email: eliezer at ngtech.co.il



-----Original Message-----
From: Alex Rousskov [mailto:rousskov at measurement-factory.com] 
Sent: Thursday, July 12, 2018 11:10 PM
To: squid-dev at lists.squid-cache.org
Cc: Eliezer Croitoru <eliezer at ngtech.co.il>
Subject: Re: [squid-dev] StoeiD and ICAP services callouts, when it happens?

On 07/12/2018 11:21 AM, Eliezer Croitoru wrote:

> With regular logformat I am using:
> %{X-Store-Id}>ha
> 
> And it works perfect.

%>ha does not log an ICAP response header. It logs an HTTP request
header. You asked about an ICAP response header.


> So I tried using the next config line for store id:
> store_id_extras "%>a/%>A %un %>rm myip=%la myport=%lp %{X-Store-Id}>ha"
> 
> which didn't worked as expected since it sends always "-".

Bugs notwithstanding, the above should work if your adaptation service
adds an X-Store-ID request header field to the adapted HTTP request. You
can check what headers Squid has for %>ha by specifying %>ha without any
parameters.


> I have now tried to understand what and how I should use the:
> %adapt::<last_h

Yes, %adapt::<last_h should work for logging the last ICAP response
header. Have you tried specified that logformat code, without any
parameters?


HTH,

Alex.




> -----Original Message-----
> From: Alex Rousskov [mailto:rousskov at measurement-factory.com] 
> Sent: Thursday, July 12, 2018 7:01 PM
> To: Eliezer Croitoru <eliezer at ngtech.co.il>; squid-dev at lists.squid-cache.org
> Subject: Re: [squid-dev] StoeiD and ICAP services callouts, when it happens?
> 
> On 07/12/2018 03:16 AM, Eliezer Croitoru wrote:
>> is it possible to pass an ICAP response header into the store_id_extras?
> 
> Yes, %adapt::<last_h should work in store_id_extras:
> 
> https://wiki.squid-cache.org/SquidFaq/OrderIsImportant#Callout_Sequence
> 
> Alex.
> 




More information about the squid-dev mailing list