<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(7,55,99)"><br></div><div class="gmail_quote"><div dir="ltr">On Wed, Jul 11, 2018 at 8:37 PM Alex Rousskov <<a href="mailto:rousskov@measurement-factory.com">rousskov@measurement-factory.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 07/10/2018 11:59 PM, Kedar K wrote:<br>
<br>
> I tried to get the request header to store id helper<br>
> with %>h option for store_id_extras; However, I get a '-'<br>
<br>
> store_id_extras "%>h %>a/%>A %un %>rm myip=%la myport=%lp"<br>
<br>
> Is this expected behaviour?<br>
<br>
No, it is not expected. Consider filing a bug report with Squid bugzilla<br>
and, if possible, attach an ALL,9 cache.log while reproducing the<br>
problem with a single wget or curl transaction. Please do not forget to<br>
specify your Squid version.<br>
<br>
If you can reproduce the problem with Squid v4 or v5, please mention<br>
that as well.</blockquote><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(7,55,99);display:inline">Thank you Alex; yes it seems a bug; tested with both store_id & url_rewrite</div> <div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(7,55,99);display:inline">extras. Either of them send blank headers. BTW I am using version 3.5.20</div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(7,55,99);display:inline">I will test with ALL,9 and report the bug.</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> Wouldn't request header be available before<br>
> sending a query to store-id helper?<br>
<br>
Yes, request headers are available at Store ID calculation time.<br>
<br>
<br>
> Is it possible to use combination of store_id_program helper and<br>
> rewrite_url_program; such that the extra params from the url are used by<br>
> store-id helper to create a store-id and then the url_rewrite program<br>
> can strip them off before sending the request to origin server? <br>
<br>
That plan would not work because the Store ID helper is consulted after<br>
the URL rewriter:<br>
<a href="https://wiki.squid-cache.org/SquidFaq/OrderIsImportant#Callout_Sequence" rel="noreferrer" target="_blank">https://wiki.squid-cache.org/SquidFaq/OrderIsImportant#Callout_Sequence</a><br>
<br></blockquote><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(7,55,99);display:inline">this makes it clear now</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Using custom headers is a much simpler/cleaner solution IMO.<br>
<br></blockquote><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(7,55,99);display:inline">Agree</div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
HTH,<br>
<br>
Alex.<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><br></div><div>- Kedar</div></div></div></div>