~ubuntu-branches/ubuntu/wily/libwww-perl/wily

« back to all changes in this revision

Viewing changes to bin/lwp-request

  • Committer: Bazaar Package Importer
  • Author(s): Antonio Radici, Antonio Radici, gregor herrmann
  • Date: 2009-02-27 23:41:21 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090227234121-j82kazqk5lmg6t4b
Tags: 5.825-1
[ Antonio Radici ]
* New upstream release
* debian/control:
  + Adding me to the Uploaders
  + removing duplicate 'priority' and 'section' from the binary package
  + added quilt dependency
  + bumped dependency to debhelper 7
* debian/compat:
  + bumped to 7
* debian/rules:
  + refreshed with dh-make-perl --dh 7
  + added quilt directives
* debian/README.source
  + added as per Debian Policy
* debian/patches/fix_no_proxy_desc.patch:
  + fix some erorrs in the description of no_proxy() on LWP::UserAgent 
  + bug already forwarded upstream (Closes: #277970)
* debian/patches/fix_ua_ssl_deps.patch:
  + fix the error message when some perl modules are not installed 
    to support HTTPS
  + bug already forwarded upstream (Closes: #500186)

[ gregor herrmann ]
* debian/control: Changed: Switched Vcs-Browser field to ViewSVN
  (source stanza).
* debian/control: Added: ${misc:Depends} to Depends: field.
* debian/copyright: update years of upstream copyright.
* debian/control: add libcrypt-ssleay-perl as an alternative suggestion
  to libio-socket-ssl-perl.

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
 
150
150
Print usage message and quit.
151
151
 
152
 
=item -x
153
 
 
154
 
Extra debugging output.
155
 
 
156
152
=item -a
157
153
 
158
154
Set text(ascii) mode for content input and output.  If this option is not
184
180
$progname =~ s,.*[\\/],,;  # use basename only
185
181
$progname =~ s/\.\w*$//;   # strip extension, if any
186
182
 
187
 
$VERSION = "5.818";
 
183
$VERSION = "5.824";
188
184
 
189
185
 
190
186
require LWP;
191
 
require LWP::Debug;
192
187
 
193
188
use URI;
194
189
use URI::Heuristic qw(uf_uri);
280
275
    'h', # print usage
281
276
    'v', # print version
282
277
    #
283
 
    'x', # extra debugging info
284
278
    'p=s', # proxy URL
285
279
    'P', # don't load proxy setting from environment
286
280
    #
306
300
 
307
301
usage() if $options{'h'} || !@ARGV;
308
302
 
309
 
LWP::Debug::level('+') if $options{'x'};
310
 
 
311
303
# Create the user agent object
312
304
$ua = RequestAgent->new;
313
305
 
429
421
    }
430
422
 
431
423
    if ($options{'S'}) {
432
 
        printResponseChain($response);
 
424
        for my $r ($response->redirects, $response) {
 
425
            my $method = $r->request->method;
 
426
            my $url = $r->request->url->as_string;
 
427
            print "$method $url --> ", $r->status_line, "\n";
 
428
        }
433
429
    }
434
430
    elsif ($options{'s'}) {
435
431
        print $response->status_line, "\n";
504
500
exit $errors;
505
501
 
506
502
 
507
 
sub printResponseChain
508
 
{
509
 
    my($response) = @_;
510
 
    return unless defined $response;
511
 
    printResponseChain($response->previous);
512
 
    my $method = $response->request->method;
513
 
    my $url = $response->request->url->as_string;
514
 
    my $code = $response->code;
515
 
    print "$method $url --> ", $response->status_line, "\n";
516
 
}
517
 
 
518
 
 
519
503
sub usage
520
504
{
521
505
    die <<"EOT";
543
527
 
544
528
    -v            Show program version
545
529
    -h            Print this message
546
 
 
547
 
    -x            Extra debugging output
548
530
EOT
549
531
}