This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update HTTP-Tiny to CPAN version 0.038
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Mon, 18 Nov 2013 19:16:26 +0000 (19:16 +0000)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Mon, 18 Nov 2013 19:16:26 +0000 (19:16 +0000)
  [DELTA]

0.038     2013-11-18 12:56:26 America/New_York

    [FIXED]

    - Fixed a bug where authentication parameters in the URL would override
      an existing Authorization header

MANIFEST
Porting/Maintainers.pl
cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
cpan/HTTP-Tiny/t/cases/auth-05.txt [new file with mode: 0644]

index 8bba4ee..2c7233a 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -1114,6 +1114,7 @@ cpan/HTTP-Tiny/t/cases/auth-01.txt
 cpan/HTTP-Tiny/t/cases/auth-02.txt
 cpan/HTTP-Tiny/t/cases/auth-03.txt
 cpan/HTTP-Tiny/t/cases/auth-04.txt
+cpan/HTTP-Tiny/t/cases/auth-05.txt
 cpan/HTTP-Tiny/t/cases/cookies-01.txt
 cpan/HTTP-Tiny/t/cases/cookies-02.txt
 cpan/HTTP-Tiny/t/cases/cookies-03.txt
index 74ed55b..2be41e6 100755 (executable)
@@ -584,7 +584,7 @@ use File::Glob qw(:case);
     },
 
     'HTTP::Tiny' => {
-        'DISTRIBUTION' => 'DAGOLDEN/HTTP-Tiny-0.037.tar.gz',
+        'DISTRIBUTION' => 'DAGOLDEN/HTTP-Tiny-0.038.tar.gz',
         'FILES'        => q[cpan/HTTP-Tiny],
         'EXCLUDED'     => [
             't/00-compile.t',
index b98e8be..0178d65 100644 (file)
@@ -3,7 +3,7 @@ package HTTP::Tiny;
 use strict;
 use warnings;
 # ABSTRACT: A small, simple, correct HTTP/1.1 client
-our $VERSION = '0.037'; # VERSION
+our $VERSION = '0.038'; # VERSION
 
 use Carp ();
 
@@ -309,7 +309,7 @@ sub _prepare_headers_and_cb {
     }
 
     # if we have Basic auth parameters, add them
-    if ( length $auth && ! defined $request->{headers}{authentication} ) {
+    if ( length $auth && ! defined $request->{headers}{authorization} ) {
         require MIME::Base64;
         $request->{headers}{authorization} =
             "Basic " . MIME::Base64::encode_base64($auth, "");
@@ -1010,7 +1010,7 @@ HTTP::Tiny - A small, simple, correct HTTP/1.1 client
 
 =head1 VERSION
 
-version 0.037
+version 0.038
 
 =head1 SYNOPSIS
 
diff --git a/cpan/HTTP-Tiny/t/cases/auth-05.txt b/cpan/HTTP-Tiny/t/cases/auth-05.txt
new file mode 100644 (file)
index 0000000..3a9970e
--- /dev/null
@@ -0,0 +1,20 @@
+url
+  http://foo:bar@example.com/index.html
+headers
+  authorization: Whatever
+expected
+  abcdefghijklmnopqrstuvwxyz1234567890abcdef
+----------
+GET /index.html HTTP/1.1
+Host: example.com
+Connection: close
+User-Agent: HTTP-Tiny/VERSION
+Authorization: Whatever
+
+----------
+HTTP/1.1 200 OK
+Date: Thu, 03 Feb 1994 00:00:00 GMT
+Content-Type: text/plain
+Content-Length: 42
+
+abcdefghijklmnopqrstuvwxyz1234567890abcdef