[Bps-public-commit] plient branch, master, updated. f16175bed2e400893e967c1283b65cab45cdf691

? sunnavy sunnavy at bestpractical.com
Tue May 4 04:31:52 EDT 2010


The branch, master has been updated
       via  f16175bed2e400893e967c1283b65cab45cdf691 (commit)
      from  d2f5c5e3b67b3f614efdf831d15f5e1eb665d210 (commit)

Summary of changes:
 lib/Plient/Handler/LWP.pm  |    2 +-
 lib/Plient/Handler/curl.pm |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit f16175bed2e400893e967c1283b65cab45cdf691
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue May 4 16:32:02 2010 +0800

    small fix

diff --git a/lib/Plient/Handler/LWP.pm b/lib/Plient/Handler/LWP.pm
index 287b72a..98f959e 100644
--- a/lib/Plient/Handler/LWP.pm
+++ b/lib/Plient/Handler/LWP.pm
@@ -87,7 +87,7 @@ sub init {
                 ? ( Content_Type => 'form−data' )
                 : ()
             ),
-            @$content ? ( Content => $content ) : (),
+            $args->{body} ? ( Content => $content ) : (),
         );
 
         if ( $res->is_success ) {
diff --git a/lib/Plient/Handler/curl.pm b/lib/Plient/Handler/curl.pm
index 5d4ff44..0b550f3 100644
--- a/lib/Plient/Handler/curl.pm
+++ b/lib/Plient/Handler/curl.pm
@@ -34,7 +34,7 @@ sub init {
     if ( exists $protocol{http} ) {
         $method{http_get} = sub {
             my ( $uri, $args ) = @_;
-            my $headers = translate_headers( $args->{headers} );
+            my $headers = translate_headers( $args );
             my $auth    = translate_auth($args);
             if ( open my $fh, "$curl -k -s -L $headers $auth $uri |" ) {
                 local $/;
@@ -101,7 +101,7 @@ sub init {
         };
         $method{http_head} = sub {
             my ( $uri, $args ) = @_;
-            my $headers = translate_headers( $args->{headers} );
+            my $headers = translate_headers( $args );
             my $auth    = translate_auth($args);
             if ( open my $fh, "$curl -s -I -L $headers $auth $uri |" ) {
                 local $/;

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list