From 9592f989308305c3daf5901f42c2e554714762b0 Mon Sep 17 00:00:00 2001
From: Slaven Rezic <srezic@iconmobile.com>
Date: Thu, 19 Mar 2009 18:09:37 +0100
Subject: [PATCH] lwp-request should use stderr for auth
---
bin/lwp-request | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/bin/lwp-request b/bin/lwp-request
index 7faaaa6..2b4b9d1 100755
--- a/bin/lwp-request
+++ b/bin/lwp-request
@@ -231,15 +231,15 @@ use HTTP::Date qw(time2str str2time);
}
elsif (-t) {
my $netloc = $uri->host_port;
- print "Enter username for $realm at $netloc: ";
+ print STDERR "Enter username for $realm at $netloc: ";
my $user = <STDIN>;
chomp($user);
return (undef, undef) unless length $user;
- print "Password: ";
+ print STDERR "Password: ";
system("stty -echo");
my $password = <STDIN>;
system("stty echo");
- print "\n"; # because we disabled echo
+ print STDERR "\n"; # because we disabled echo
chomp($password);
return ($user, $password);
}
@@ -362,7 +362,7 @@ if ($allowed_methods{$method} eq "C") {
die "$progname: Illegal Content-type format\n"
unless $options{'c'} =~ m,^[\w\-]+/[\w\-.+]+(?:\s*;.*)?$,
}
- print "Please enter content ($options{'c'}) to be ${method}ed:\n"
+ print STDERR "Please enter content ($options{'c'}) to be ${method}ed:\n"
if -t;
binmode STDIN unless -t or $options{'a'};
$content = join("", <STDIN>);
--
1.6.2