[squid-users] Re: writing storeid.pl file

From: babajaga <augustus_meyer_at_yahoo.de>
Date: Wed, 13 Aug 2014 15:15:21 -0700 (PDT)

Real, but obsolete example (squid2.7):

#!/usr/bin/perl
$|=1;
while (<>) {
    chomp;
    @X = split;
if ($X[0] =~ /(youtube|google).*videoplayback\?/){
        @itag = m/[&?](itag=[0-9]*)/;
        @id = m/[&?](id=[^\&\s]*)/;
        @range = m/[&?](range=[^\&\s]*)/;
        @begin = m/[&?](begin=[^\&\s]*)/;
         print
"http://video-srv.youtube.com.SQUIDINTERNAL/@id&@itag@range@begin\n";
    } else {
        print $X[0] . "\n";
    }
}

Send me a beer :-)

--
View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/writing-storeid-pl-file-tp4667206p4667208.html
Sent from the Squid - Users mailing list archive at Nabble.com.
Received on Wed Aug 13 2014 - 22:15:34 MDT

This archive was generated by hypermail 2.2.0 : Thu Aug 14 2014 - 12:00:05 MDT