summaryrefslogtreecommitdiff
path: root/cpan/HTTP-Tiny
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2013-11-18 19:16:26 +0000
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2013-11-18 19:16:26 +0000
commitf2756cbb47e4bb872c6b9acc9ee0f67b30167864 (patch)
tree1f87eb008049a9ce1f46be2f478041933d2db20e /cpan/HTTP-Tiny
parente5411d1e697dbd2a9c54734aac44ac6189b517e0 (diff)
downloadperl-f2756cbb47e4bb872c6b9acc9ee0f67b30167864.tar.gz
Update HTTP-Tiny to CPAN version 0.038
[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
Diffstat (limited to 'cpan/HTTP-Tiny')
-rw-r--r--cpan/HTTP-Tiny/lib/HTTP/Tiny.pm6
-rw-r--r--cpan/HTTP-Tiny/t/cases/auth-05.txt20
2 files changed, 23 insertions, 3 deletions
diff --git a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
index b98e8bea31..0178d65929 100644
--- a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
+++ b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm
@@ -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
index 0000000000..3a9970e08e
--- /dev/null
+++ b/cpan/HTTP-Tiny/t/cases/auth-05.txt
@@ -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