Subject: | lwp-request: honor "-e" while "-S" |
Small kludge* to display each response's headers when requests chain
display is enabled.
It answers this request:
http://www.nntp.perl.org/group/perl.libwww/2010/08/msg7427.html
* refactoring the entire section could avoid duplication
Subject: | lwp-honor-e-while-S.diff |
--- bin/lwp-request.orig 2009-11-21 14:57:41.000000000 +0200
+++ bin/lwp-request 2010-08-22 17:38:30.376177590 +0300
@@ -425,6 +425,9 @@
my $method = $r->request->method;
my $url = $r->request->uri->as_string;
print "$method $url --> ", $r->status_line, "\n";
+ if ( $options{'e'} && $r ne $response ) {
+ print $r->headers_as_string, "\n";
+ }
}
}
elsif ($options{'s'}) {