File: rfc.pl

package info (click to toggle)
libhttp-proxy-perl 0.304-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 720 kB
  • sloc: perl: 2,576; makefile: 4
file content (20 lines) | stat: -rwxr-xr-x 398 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl -w
use HTTP::Proxy;
use HTTP::Proxy::BodyFilter::save;

my $proxy = HTTP::Proxy->new(@ARGV);

# save RFC files as we browse them
$proxy->push_filter(
    path => qr!/rfc\d+.txt!,
    mime => 'text/plain',
    response => HTTP::Proxy::BodyFilter::save->new(
        template => '%f',
        prefix   => 'rfc',
        multiple => 0,
        keep_old => 1,
    )
);

$proxy->start;