<div dir="ltr">Thanks Amos, for the help so far.  Unfortunately, I'm still stuck even with the most recent daily.. Using http_access I don't seem to get the kv-pairs passed to my <span style="font-size:12.8000001907349px">url_rewrite_program</span> but I do see the user= value in my access.log.  The <span style="font-size:12.8000001907349px">adapted_http_access concept seemed promising but my helpers don't seem like they're being called when I use it.  The user= value no longer shows up in access.log and my helper logs are empty.</span><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Is this a known issue?  Is there anything I can provide that would be helpful?</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 22, 2015 at 10:44 AM, Patrick <span dir="ltr"><<a href="mailto:pkryon@gmail.com" target="_blank">pkryon@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><span style="font-size:12.8000001907349px">Hmm, the helper does seem to be working and returning user=X as expected. In fact the user does show up in Squid's access.log and as configured I have no other sources for usernames.</span><div style="font-size:12.8000001907349px"><br></div></span><div><span style="font-size:12.8000001907349px">I'm not using ICAP (at least intentionally), but switching to adapted_http_access doesn't not seem to help me.  I switch my url_rewrite_access from the tee I was running before to a quick script that logs stdin and returns OK no matter what it gets.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">So using...</span><br><br><span style="font-size:12.8000001907349px">url_rewrite_extras "%>a/%>A %ue %>rm myip=%la myport=%lp"<br></span>url_rewrite_program /opt/idbf-dev/idbf_squid_url_rewrite_test.py<br><br>My logs show:<br><br><div>2015-05-22 10:34:59,175 - root - DEBUG    - <a href="http://www.ipchicken.com/images/9.gif" target="_blank">http://www.ipchicken.com/images/9.gif</a> <a href="http://172.20.15.235/pcname.example.com" target="_blank">172.20.15.235/pcname.example.com</a> - GET myip=- myport=3129</div><div>2015-05-22 10:34:59,213 - root - DEBUG    - <a href="http://www.ipchicken.com/images/pixel.gif" target="_blank">http://www.ipchicken.com/images/pixel.gif</a> <a href="http://172.20.15.235/pcname.example.com" target="_blank">172.20.15.235/pcname.example.com</a> - GET myip=- myport=3129<br></div><div>2015-05-22 10:34:59,225 - root - DEBUG    - <a href="http://www.ipchicken.com/images/green.gif" target="_blank">http://www.ipchicken.com/images/green.gif</a> <a href="http://172.20.15.235/pcname.example.com" target="_blank">172.20.15.235/pcname.example.com</a> - GET myip=- myport=3129<br></div><div>2015-05-22 10:34:59,241 - root - DEBUG    - <a href="http://www.ipchicken.com/images/ipc.gif" target="_blank">http://www.ipchicken.com/images/ipc.gif</a> <a href="http://172.20.15.235/pcname.example.com" target="_blank">172.20.15.235/pcname.example.com</a> - GET myip=- myport=3129<br></div><div>2015-05-22 10:35:01,052 - root - DEBUG    - <a href="http://www.ipchicken.com/" target="_blank">http://www.ipchicken.com/</a> <a href="http://172.20.15.235/pcname.example.com" target="_blank">172.20.15.235/pcname.example.com</a> - GET myip=- myport=3129<br><br>And access.log shows:<br><br><div>1432305299.216     41 172.20.15.235 TCP_MISS/304 270 GET <a href="http://www.ipchicken.com/images/9.gif" target="_blank">http://www.ipchicken.com/images/9.gif</a> ryonpk ORIGINAL_DST/<a href="http://209.68.27.16" target="_blank">209.68.27.16</a> -</div><div>1432305299.256     43 172.20.15.235 TCP_MISS/304 270 GET <a href="http://www.ipchicken.com/images/pixel.gif" target="_blank">http://www.ipchicken.com/images/pixel.gif</a> ryonpk ORIGINAL_DST/<a href="http://209.68.27.16" target="_blank">209.68.27.16</a> -</div><div>1432305299.264     51 172.20.15.235 TCP_MISS/304 271 GET <a href="http://www.ipchicken.com/images/green.gif" target="_blank">http://www.ipchicken.com/images/green.gif</a> ryonpk ORIGINAL_DST/<a href="http://209.68.27.16" target="_blank">209.68.27.16</a> -</div><div>1432305299.281     68 172.20.15.235 TCP_MISS/304 271 GET <a href="http://www.ipchicken.com/images/ipc.gif" target="_blank">http://www.ipchicken.com/images/ipc.gif</a> ryonpk ORIGINAL_DST/<a href="http://209.68.27.16" target="_blank">209.68.27.16</a> -</div><div>1432305301.137     85 172.20.15.235 TCP_MISS/200 6488 GET <a href="http://www.ipchicken.com/" target="_blank">http://www.ipchicken.com/</a> ryonpk ORIGINAL_DST/<a href="http://209.68.27.16" target="_blank">209.68.27.16</a> text/html<br><br>ryonpk is the correct user passed from the helper.</div></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 22, 2015 at 9:14 AM, Amos Jeffries <span dir="ltr"><<a href="mailto:squid3@treenet.co.nz" target="_blank">squid3@treenet.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 23/05/2015 12:59 a.m., Patrick wrote:<br>
> Thanks for looking at this, Amos.  Unfortunately, I am still seeing the<br>
> same result with the squid-3.5.4-20150522-r13836 daily.<br>
><br>
> I was thinking I might just being seeing what's described at<br>
> <a href="http://www.squid-cache.org/Doc/config/url_rewrite_extras/" target="_blank">http://www.squid-cache.org/Doc/config/url_rewrite_extras/</a> as "In practice,<br>
> a %macro expands as a dash (-) if the helper request is sent before the<br>
> required macro information is available to Squid."  But I guess if that was<br>
> the case I would have expected to see the dash only on the first request<br>
> with the subsequent requests returning the %ue value at least within the<br>
> ttl.  But I get just the dash on every request.<br>
><br>
<br>
</span>No, you should be getting the value from the user=X kv-pair produced by<br>
the helper on every request. The bug fixed by Nathan was that only the<br>
first was and the rest wrongly got "-".<br>
<br>
If you are getting it on absolutely all requests it would seem the<br>
helper is not producing user=X.<br>
<br>
Or possibly ICAP is stripping it away again by creating a new "adapted"<br>
request. If that is the case use the external_acl_type helper in the<br>
adapted_http_access checks instead of http_access.<br>
<div><div><br>
Amos<br>
<br>
_______________________________________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org" target="_blank">squid-users@lists.squid-cache.org</a><br>
<a href="http://lists.squid-cache.org/listinfo/squid-users" target="_blank">http://lists.squid-cache.org/listinfo/squid-users</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>