~ubuntu-branches/ubuntu/lucid/libwww-perl/lucid

« back to all changes in this revision

Viewing changes to bin/lwp-request

  • Committer: Bazaar Package Importer
  • Author(s): Nathan Handler
  • Date: 2009-06-26 23:23:20 UTC
  • mfrom: (1.3.1 upstream) (10.1.1 karmic)
  • Revision ID: james.westby@ubuntu.com-20090626232320-jd118bn94viy0isk
Tags: 5.828-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
$progname =~ s,.*[\\/],,;  # use basename only
181
181
$progname =~ s/\.\w*$//;   # strip extension, if any
182
182
 
183
 
$VERSION = "5.824";
 
183
$VERSION = "5.827";
184
184
 
185
185
 
186
186
require LWP;
411
411
    $ua->proxy($url->scheme, $options{'p'}) if $options{'p'};
412
412
 
413
413
    # Send the request and get a response back from the server
414
 
    $request->url($url);
 
414
    $request->uri($url);
415
415
    $response = $ua->request($request);
416
416
 
417
417
    if ($options{'u'} || $options{'U'}) {
418
 
        my $url = $response->request->url->as_string;
 
418
        my $url = $response->request->uri->as_string;
419
419
        print "$method $url\n";
420
420
        print $response->request->headers_as_string, "\n" if $options{'U'};
421
421
    }
423
423
    if ($options{'S'}) {
424
424
        for my $r ($response->redirects, $response) {
425
425
            my $method = $r->request->method;
426
 
            my $url = $r->request->url->as_string;
 
426
            my $url = $r->request->uri->as_string;
427
427
            print "$method $url --> ", $r->status_line, "\n";
428
428
        }
429
429
    }