madhuneal / lusca-cache

Automatically exported from code.google.com/p/lusca-cache
0 stars 0 forks source link

storeurl_rewrite some issues #144

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Good day all...
I am using lusca_cache latest stable release yet i have the following issue 
when using store_url_rewrite
everything set up in correct manner as such:

// code snippet squid.conf
#################################
# call storeurl rewrite helper program
storeurl_rewrite_program /usr/local/bin/storeurl.pl
storeurl_rewrite_children 1
storeurl_rewrite_concurrency 10
acl store_rewrite_list_path urlpath_regex utm\.gif
storeurl_access allow store_rewrite_list

acl remove_header_access urlpath_regex -i (utm.gif)
header_access Cache-Control deny remove_header_access
header_access Pragma deny remove_header_access
header_access Expires deny remove_header_access
header_replace Expires Wed, 30 May 2012 12:37:43 GMT

##################################

//code snippet storeurl.pl
######################################
if (m/^http:\/\/www\.google-analytics\.com\/__utm\.gif\?.*/) {
print $x . "http://www.google-analytics.com/__utm.gif\n";
}
######################################

now when i do wget as the following:
you see that header access header_replace works fine yet somehow the request is 
not saved as it should be.

wget -S --delete-after 
'http://www.google-analytics.com/__utm.gif?utmwv=4.9.4&utms=5&utmn=805104046&utm
hn=www.ahlasoot.com&utmcs=utf-8&utmsr=1024x768&utmsc=32-bit&utmul=en-us&utmje=1&
utmfl=10.2%20r152&utmdt=Joseph%20Attieh&utmhid=326163588&utmr=0&utmp=%2Fartist.a
sp%3FID%3D467&utmac=UA-7241688-1&utmcc=__utma%3D247632983.412945706.1301408384.1
306419471.1306746828.17%3B%2B__utmz%3D247632983.1301408385.1.1.utmcsr%3D(direct)
%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B&utmu=D%7E' -O utm.gif
--2011-05-30 13:00:52-- 
http://www.google-analytics.com/__utm.gif?utmwv=4.9.4&utms=5&utmn=805104046&utmh
n=www.ahlasoot.com&utmcs=utf-8&utmsr=1024x768&utmsc=32-bit&utmul=en-us&utmje=1&u
tmfl=10.2%20r152&utmdt=Joseph%20Attieh&utmhid=326163588&utmr=0&utmp=%2Fartist.as
p%3FID%3D467&utmac=UA-7241688-1&utmcc=__utma%3D247632983.412945706.1301408384.13
06419471.1306746828.17%3B%2B__utmz%3D247632983.1301408385.1.1.utmcsr%3D(direct)%
7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B&utmu=D%7E
Resolving www.google-analytics.com... 209.85.143.100, 209.85.143.101
Connecting to www.google-analytics.com|209.85.143.100|:80... connected.
HTTP request sent, awaiting response...

HTTP/1.0 200 OK
Date: Wed, 25 May 2011 20:08:40 GMT
Content-Length: 35
Expires: Wed, 30 May 2012 12:37:43 GMT
Last-Modified: Wed, 21 Jan 2004 19:51:30 GMT
Content-Type: image/gif
Server: GFE/2.0
X-Cache: MISS from local-cache.com.lb
Connection: close
Length: 35 [image/gif]
Saving to: “utm.gif”

Much Regards

Faysal Banna
Meteorological Services
Rafic Harriri international airport
Beirut Lebanon
mobile: +961-3-258043

Original issue reported on code.google.com by degreane@gmail.com on 30 May 2011 at 10:10

GoogleCodeExporter commented 9 years ago
I have another issue here with header_access 
notice that Expires still included inside the reply 

regard the following snippet:

// from squid.conf 
header_access Expires deny all

// wget some stuff

 wget -S --delete-after -O gads 'http://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-3935708243204936&output=html&h=60&slotname=0541116695&w=468&lmt=1306750925&flash=10.3.181&url=http%3A%2F%2Fstarscene.dailystar.com.lb%2Fsocial-scene%2F2010%2F06%2Fmurex-dor-celebrates-10th-anniversary-at-edde-sands%2F&dt=1306750944507&bpp=4&shv=r20110518&jsv=r20110506&correlator=1306750944643&frm=0&adk=1623393450&ga_vid=445846148.1271628975&ga_sid=1306750930&ga_hid=1401603995&ga_fc=1&u_tz=180&u_his=1&u_java=0&u_h=800&u_w=1280&u_ah=738&u_aw=1280&u_cd=24&u_nplug=18&u_nmime=79&biw=1263&bih=649&ref=http%3A%2F%2Fwww.google.com%2Furl%3Fsa%3Dt%26source%3Dweb%26cd%3D7%26ved%3D0CEUQFjAG%26url%3Dhttp%253A%252F%252Fstarscene.dailystar.com.lb%252Fsocial-scene%252F2010%252F06%252Fmurex-dor-celebrates-10th-anniversary-at-edde-sands%252F%26rct%3Dj%26q%3Dmurex%2520d%2527or%26ei%3Dtm_jTZXaHcnBhAfLoNzpBw%26usg%3DAFQjCNGfMGrDWk3gw5HSenn5u-ixXYDxlQ%26cad%3Drja&fu=0&ifi=1&dtd=2119&xpc=piiOiFt9vI&p=http%3A//starscene.dailystar.com.lb'
--2011-05-30 13:57:54--  
http://googleads.g.doubleclick.net/pagead/ads?client=ca-pub-3935708243204936&out
put=html&h=60&slotname=0541116695&w=468&lmt=1306750925&flash=10.3.181&url=http%3
A%2F%2Fstarscene.dailystar.com.lb%2Fsocial-scene%2F2010%2F06%2Fmurex-dor-celebra
tes-10th-anniversary-at-edde-sands%2F&dt=1306750944507&bpp=4&shv=r20110518&jsv=r
20110506&correlator=1306750944643&frm=0&adk=1623393450&ga_vid=445846148.12716289
75&ga_sid=1306750930&ga_hid=1401603995&ga_fc=1&u_tz=180&u_his=1&u_java=0&u_h=800
&u_w=1280&u_ah=738&u_aw=1280&u_cd=24&u_nplug=18&u_nmime=79&biw=1263&bih=649&ref=
http%3A%2F%2Fwww.google.com%2Furl%3Fsa%3Dt%26source%3Dweb%26cd%3D7%26ved%3D0CEUQ
FjAG%26url%3Dhttp%253A%252F%252Fstarscene.dailystar.com.lb%252Fsocial-scene%252F
2010%252F06%252Fmurex-dor-celebrates-10th-anniversary-at-edde-sands%252F%26rct%3
Dj%26q%3Dmurex%2520d%2527or%26ei%3Dtm_jTZXaHcnBhAfLoNzpBw%26usg%3DAFQjCNGfMGrDWk
3gw5HSenn5u-ixXYDxlQ%26cad%3Drja&fu=0&ifi=1&dtd=2119&xpc=piiOiFt9vI&p=http%3A//s
tarscene.dailystar.com.lb
Resolving googleads.g.doubleclick.net... 74.125.77.156, 74.125.77.154, 
74.125.77.155
Connecting to googleads.g.doubleclick.net|74.125.77.156|:80... connected.
HTTP request sent, awaiting response... 
  HTTP/1.0 200 OK
  P3P: policyref="http://googleads.g.doubleclick.net/pagead/gcn_p3p_.xml", CP="CURa ADMa DEVa TAIo PSAo PSDo OUR IND UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"
  Content-Type: text/html; charset=UTF-8
  X-Content-Type-Options: nosniff
  Date: Mon, 30 May 2011 10:50:40 GMT
  Server: cafe
  X-XSS-Protection: 1; mode=block
  Expires: Wed, 30 May 2012 12:37:43 GMT
  X-Cache: MISS from sms.org
  Connection: close
Length: unspecified [text/html]
Saving to: “gads”

    [   <=>                                                                                                                                                                 ] 4,373       4.25K/s   in 1.0s    

2011-05-30 13:57:57 (4.25 KB/s) - “gads” saved [4373]

Removing gads.

Original comment by degreane@gmail.com on 30 May 2011 at 10:56