multiple requests from single URL on web page?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

multiple requests from single URL on web page?

Kevin Kretz
Hi,

I'm using external_acl_type to handle web traffic based on authenticated user and destination.  I'm also passing the referer to the external acl.   I know referer isn't to be relied on, but right off the bat I see two ACL queries for a single URL.  One has a referrer and the other doesn't.

Here's the acl line from my squid.conf:

external_acl_type custom_acl_db cache=0 children-max=5 %ACL %DATA %ul %SRC %>rd %{Referer}>h (acl script name)

Here's the HTML from a very simple page I'm accessing:

”."><HTML>
<HEAD></HEAD>
<BODY>

<IMG SRC="<a class="attribute-value" href="view-source:http://upload.wikimedia.org/wikipedia/en/thumb/5/53/Snoopy_Peanuts.png/200px-Snoopy_Peanuts.png" data-mce-href="view-source:http://upload.wikimedia.org/wikipedia/en/thumb/5/53/Snoopy_Peanuts.png/200px-Snoopy_Peanuts.png">http://domain1.com/image1.png">
<BR>
<IMG SRC="<a class="attribute-value" href="view-source:http://static.rgscdn.com/images/xl/702021.jpg" data-mce-href="view-source:http://static.rgscdn.com/images/xl/702021.jpg">http://domain2.com/image2.jpg">

</BODY>
</HTML>

When I access that page through squid, I see one image's URL once, with no referrer, and the other one two times - once with a referrer and once without:

 CustomAclDB - kevin 172.18.127.4 domain2.com http://server_hosting_test_page/test/

 CustomAclDB - kevin 172.18.127.4 domain1.com -

 CustomAclDB - kevin 172.18.127.4 domain2.com -


Why the inconsistency?


Thanks


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

Re: multiple requests from single URL on web page?

Alex Rousskov
On 10/04/2018 02:37 PM, Kevin Kretz wrote:

> I'm using external_acl_type to handle web traffic based on authenticated
> user and destination.  I'm also passing the referer to the external
> acl.   I know referer isn't to be relied on, but right off the bat I see
> two ACL queries for a single URL.  One has a referrer and the other doesn't.

> Here's the acl line from my squid.conf:

> external_acl_type custom_acl_db cache=0 children-max=5 %ACL %DATA %ul
> %SRC %>rd %{Referer}>h (acl script name)

> Here's the HTML from a very simple page I'm accessing:

> <IMG SRC="http://domain1.com/image1.png">
> <IMG SRC="http://domain2.com/image2.jpg">

> When I access that page through squid, I see one image's URL once, with
> no referrer, and the other one two times - once with a referrer and once
> without:

>  CustomAclDB - kevin 172.18.127.4 domain2.com http://server_hosting_test_page/test/ 
>  CustomAclDB - kevin 172.18.127.4 domain1.com -
>  CustomAclDB - kevin 172.18.127.4 domain2.com -


> Why the inconsistency?

Do the corresponding HTTP requests received by Squid contain the Referer
header? Use packet captures or "debug_options ALL,2" to see those requests.

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