Squid Windows Update regular expression



  • We are running pfSense 2.0-RC3 (and most recent updates), along with Squid 2.7.9_4.1.  We are trying to get Windows Updates to cache and tried the rule shown in the Wiki docs.  We get the following message in /var/squid/log/cache.log when we try to use that rule (as it appears others are):

    2011/06/30 16:08:17| parse_refreshpattern: Invalid regular expression '([^.]+.|)(download|(windows|)update|).(microsoft.|)com/.*.(cab|exe|msi|msp)': empty (sub)expression

    Using a web based regex parser it appears to be a valid pattern.  Does anybody have a solution to this?  Is there any way to have squid give us more detail on what it does not like about that expression?

    Thanks!



  • I have the same problem.



  • Try this:

    
    refresh_pattern -i .*microsoft\.com/.*\.(cab|exe|msi|msp) 129600 100% 129600 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private;
    refresh_pattern -i .*windowsupdate\.com/.*\.(cab|exe|msi|msp) 129600 100% 129600 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private;
    
    

    –-edit---
    Did you post the whole line ?
    there is the time missing  1440 100% 1440 and then the subexpressions like reload-into-ims



  • Finally, I modified the regexp to:

    refresh_pattern ([^.]+.)?(download|(windows)?update).(microsoft.)?com/.*.(cab|exe|msi|msp|psf) 4320 100% 43200 reload-into-ims;range_offset_limit -1;


Locked