From: Michael Chase-S. <mc...@us...> - 2013-02-20 17:03:37
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "sfcb - Small Footprint CIM Broker". The branch, master has been updated via 41982d1f73f84c553182ee213fcaae32b9cd0910 (commit) via 9a1084242d5828aff91bca5ea2e3fb67d7a0bb82 (commit) from 840ee3df1dce230cfd03d7d171946d26f456a31f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 41982d1f73f84c553182ee213fcaae32b9cd0910 Merge: 9a10842 840ee3d Author: Michael Chase-Salerno <br...@li...> Date: Wed Feb 20 12:03:09 2013 -0500 Merge branch 'master' of ssh://git.code.sf.net/p/sblim/sfcb Conflicts: NEWS commit 9a1084242d5828aff91bca5ea2e3fb67d7a0bb82 Author: Michael Chase-Salerno <br...@li...> Date: Wed Feb 20 12:01:56 2013 -0500 [#2490] wbemcat should use URI perl module ----------------------------------------------------------------------- Summary of changes: NEWS | 2 ++ wbemcat | 18 +++++++----------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index fa598bd..2a15235 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,8 @@ Bugs fixed: - 2612 Don't persist indications - 2613 Check sfcCommon version - 2552 datetime conversions do not handle timezone +- 2490 wbemcat should use URI perl module +======= Changes in 1.4.3 ================ diff --git a/wbemcat b/wbemcat index 55c765b..4794d6a 100755 --- a/wbemcat +++ b/wbemcat @@ -3,6 +3,7 @@ use strict; use Getopt::Long; use LWP::UserAgent; +use URI; my $version = "1.1.0"; my $port = 5988; @@ -10,7 +11,6 @@ my $host = "localhost"; my $protocol = "http"; my $user=""; my $password=""; -my $cred_host=""; my $content_type = "application/xml"; #default for xml requests my $path = "/cimom"; #default for xml requests my $method= "POST"; #default for xml requests @@ -60,19 +60,15 @@ if ($file) { $payloadstr = join("", @payload); -if ( $user && $password ) -{ - $cred_host=$user . ":" . $password . "@" . $host; -} -else -{ - $cred_host = $host; -} - my $ua = LWP::UserAgent->new; $ua->agent("wbemcat $version"); -my $req = HTTP::Request->new($method, "$protocol://$cred_host:$port$path"); +my $uri = URI->new("$protocol://$host:$port$path"); +if ( $user && $password ) +{ + $uri->userinfo("$user:$password"); +} +my $req = HTTP::Request->new($method, $uri); $req->content_type($content_type); if ($content_type eq "application/xml") { $req->header("CIMProtocolVersion" => "1.0", hooks/post-receive -- sfcb - Small Footprint CIM Broker |