Add a paragraph to summarize the motivation for releases since 5.815
[libwww-perl-eserte.git] / t / net / proxy.t
blobce0df7c36d864b35326199b7cd837689dd6aa178
1 #!/usr/local/bin/perl -w
3 # Test retrieving a file with a 'ftp://' URL,
4 # via a HTTP proxy.
7 print "1..1\n";
9 require "net/config.pl";
10 unless (defined $net::ftp_proxy) {
11 print "not ok 1\n";
12 exit 0;
15 require LWP::Debug;
16 require LWP::UserAgent;
18 #LWP::Debug::level('+');
20 my $ua = new LWP::UserAgent; # create a useragent to test
22 $ua->proxy('ftp', $net::ftp_proxy);
24 my $url = new URI::URL('ftp://ftp.uninett.no/');
26 my $request = new HTTP::Request('GET', $url);
28 my $response = $ua->request($request, undef, undef);
30 my $str = $response->as_string;
32 if ($response->is_success) {
33 print "ok 1\n";
35 else {
36 print "not ok 1\n";