[squid-users] user agent

joe chip_pop at hotmail.com
Fri Sep 18 09:32:33 UTC 2015


hi i  need to have 3 useragent replace and its not working
example         
acl brs browser -i Mozilla.*Window.*
acl phone-brs browser -i Mozilla.*(Android|iPhone|iPad).*

request_header_access User-Agent deny brs !phone-brs
request_header_replace User-Agent Mozilla/5.0 (Windows NT 5.1; rv:40.0)
Gecko/20100101 

request_header_access User-Agent deny phone-brs !brs 
request_header_replace User-Agent Mozilla/5.0 (Android; iPhone; Mobile;)
Gecko/18.0  


what happen is  if i have 2 or more useragent replace it replace all match
on both acl with second request_header_replace

so brs and phone-brs they hook on request_header_replace User-Agent
Mozilla/5.0 (Android; iPhone; Mobile;) Gecko/18.0 any idea how to fix this
or its a bug ??
for my understanding is wen first brs deny happen the $user_agent variable
load the first then it re load the second replace and send to browser this
is bad   it should work on first one then the second replace should be
discarded cause it did not match on first deny so here is my suggestion
to do pls its important so it wont miss grab the right replace

request_header_access User-Agent deny brs 
request_header_replace User-Agent Mozilla/5.0 (Windows NT 5.1; rv:40.0)
Gecko/20100101 {brs}

so add pls a match at the end to the request_header_replace *.*  brs
tks



  



--
View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/user-agent-tp4673284.html
Sent from the Squid - Users mailing list archive at Nabble.com.


More information about the squid-users mailing list