relax .pdf extension and mirror only if timestamp changed
authorDobrica Pavlinušić <dpavlin@rot13.org>
Wed, 25 Nov 2009 11:22:29 +0000 (12:22 +0100)
committerDobrica Pavlinušić <dpavlin@rot13.org>
Wed, 25 Nov 2009 11:22:29 +0000 (12:22 +0100)
proxy.pl

index 590da2d..a5b545e 100755 (executable)
--- a/proxy.pl
+++ b/proxy.pl
@@ -146,10 +146,11 @@ else {
 my $saved;
 $proxy->push_filter(
     # you should probably restrict this to certain hosts as well
-    path => qr/\.pdf$/,
+    path => qr/\.pdf\b/,
     mime => 'application/pdf',
     # save the PDF
     response => HTTP::Proxy::BodyFilter::save->new(
+       timestamp => 1,
         template => "%f",
         prefix   => 'pdf'
     ),