Hello community,

here is the log from the commit of package perl-HTTP-Tiny for openSUSE:Factory 
checked in at 2016-05-12 09:33:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-HTTP-Tiny (Old)
 and      /work/SRC/openSUSE:Factory/.perl-HTTP-Tiny.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-HTTP-Tiny"

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-HTTP-Tiny/perl-HTTP-Tiny.changes    
2015-05-22 09:52:37.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.perl-HTTP-Tiny.new/perl-HTTP-Tiny.changes       
2016-05-12 09:33:23.000000000 +0200
@@ -1,0 +2,46 @@
+Thu May  5 09:24:06 UTC 2016 - co...@suse.com
+
+- updated to 0.058
+   see /usr/share/doc/packages/perl-HTTP-Tiny/Changes
+
+  0.058     2016-05-03 11:29:57-04:00 America/New_York
+  
+      - No changes from 0.057
+  
+  0.057     2016-04-18 10:17:00-04:00 America/New_York (TRIAL RELEASE)
+  
+      [ADDED]
+  
+      - Added support for the SSL_CERT_FILE environment variable.
+  
+      - Added 'peer' attribute to force a connection to a particular
+        server.
+  
+      - Added 'connected' method to allow introspection of persistent
+        connections.
+  
+      - An array reference of redirection result hash references is included
+        in the final response hash reference (but only if redirects occur).
+  
+      [CHANGED]
+  
+      - Because folded headers are obsoleted in the revised RFCs, if CRLF is
+        found in header values followed by one or more spaces, they are all
+        replaced by a single space.
+  
+      [FIXED]
+  
+      - Per the RFC, control headers are now sent first before other headers
+        (which are sent in arbitrary order).
+  
+      - Only well-known headers have their case canonicalized; all other
+        headers are sent in the case provided by the user.
+  
+      - The 'keep_alive' option now also sets the SO_KEEPALIVE option
+        on the underlying socket to help with long-lived, idle connections.
+  
+      - Request header field values are now validated against the RFC rules
+        (i.e. empty or else space-or-tab separated tokens of printable
+        characters).
+
+-------------------------------------------------------------------

Old:
----
  HTTP-Tiny-0.056.tar.gz

New:
----
  HTTP-Tiny-0.058.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-HTTP-Tiny.spec ++++++
--- /var/tmp/diff_new_pack.RhITWP/_old  2016-05-12 09:33:24.000000000 +0200
+++ /var/tmp/diff_new_pack.RhITWP/_new  2016-05-12 09:33:24.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-HTTP-Tiny
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           perl-HTTP-Tiny
-Version:        0.056
+Version:        0.058
 Release:        0
 %define cpan_name HTTP-Tiny
 Summary:        Small, Simple, Correct Http/1.1 Client
@@ -33,28 +33,27 @@
 BuildRequires:  perl(IPC::Cmd)
 BuildRequires:  perl(Test::More) >= 0.96
 Recommends:     perl(HTTP::CookieJar) >= 0.001
-Recommends:     perl(IO::Socket::IP) >= 0.25
+Recommends:     perl(IO::Socket::IP) >= 0.32
 Recommends:     perl(IO::Socket::SSL) >= 1.42
-Recommends:     perl(Mozilla::CA) >= 20130114
+Recommends:     perl(Mozilla::CA) >= 20160104
 Recommends:     perl(Net::SSLeay) >= 1.49
 %{perl_requires}
 
 %description
 This is a very simple HTTP/1.1 client, designed for doing simple requests
-without the overhead of a large framework like the LWP::UserAgent manpage.
+without the overhead of a large framework like LWP::UserAgent.
 
-It is more correct and more complete than the HTTP::Lite manpage. It
-supports proxies and redirection. It also correctly resumes after EINTR.
+It is more correct and more complete than HTTP::Lite. It supports proxies
+and redirection. It also correctly resumes after EINTR.
 
-If the IO::Socket::IP manpage 0.25 or later is installed, HTTP::Tiny will
-use it instead of the IO::Socket::INET manpage for transparent support for
-both IPv4 and IPv6.
+If IO::Socket::IP 0.25 or later is installed, HTTP::Tiny will use it
+instead of IO::Socket::INET for transparent support for both IPv4 and IPv6.
 
-Cookie support requires the HTTP::CookieJar manpage or an equivalent class.
+Cookie support requires HTTP::CookieJar or an equivalent class.
 
 %prep
 %setup -q -n %{cpan_name}-%{version}
-find . -type f -print0 | xargs -0 chmod 644
+find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
 
 %build
 %{__perl} Makefile.PL INSTALLDIRS=vendor

++++++ HTTP-Tiny-0.056.tar.gz -> HTTP-Tiny-0.058.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/Changes new/HTTP-Tiny-0.058/Changes
--- old/HTTP-Tiny-0.056/Changes 2015-05-19 12:00:48.000000000 +0200
+++ new/HTTP-Tiny-0.058/Changes 2016-05-03 17:30:06.000000000 +0200
@@ -1,5 +1,45 @@
 Release notes for HTTP-Tiny
 
+0.058     2016-05-03 11:29:57-04:00 America/New_York
+
+    - No changes from 0.057
+
+0.057     2016-04-18 10:17:00-04:00 America/New_York (TRIAL RELEASE)
+
+    [ADDED]
+
+    - Added support for the SSL_CERT_FILE environment variable.
+
+    - Added 'peer' attribute to force a connection to a particular
+      server.
+
+    - Added 'connected' method to allow introspection of persistent
+      connections.
+
+    - An array reference of redirection result hash references is included
+      in the final response hash reference (but only if redirects occur).
+
+    [CHANGED]
+
+    - Because folded headers are obsoleted in the revised RFCs, if CRLF is
+      found in header values followed by one or more spaces, they are all
+      replaced by a single space.
+
+    [FIXED]
+
+    - Per the RFC, control headers are now sent first before other headers
+      (which are sent in arbitrary order).
+
+    - Only well-known headers have their case canonicalized; all other
+      headers are sent in the case provided by the user.
+
+    - The 'keep_alive' option now also sets the SO_KEEPALIVE option
+      on the underlying socket to help with long-lived, idle connections.
+
+    - Request header field values are now validated against the RFC rules
+      (i.e. empty or else space-or-tab separated tokens of printable
+      characters).
+
 0.056     2015-05-19 06:00:40-04:00 America/New_York
 
     - No changes from 0.055
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/LICENSE new/HTTP-Tiny-0.058/LICENSE
--- old/HTTP-Tiny-0.056/LICENSE 2015-05-19 12:00:48.000000000 +0200
+++ new/HTTP-Tiny-0.058/LICENSE 2016-05-03 17:30:06.000000000 +0200
@@ -1,4 +1,4 @@
-This software is copyright (c) 2015 by Christian Hansen.
+This software is copyright (c) 2016 by Christian Hansen.
 
 This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@
 
 --- The GNU General Public License, Version 1, February 1989 ---
 
-This software is Copyright (c) 2015 by Christian Hansen.
+This software is Copyright (c) 2016 by Christian Hansen.
 
 This is free software, licensed under:
 
@@ -272,7 +272,7 @@
 
 --- The Artistic License 1.0 ---
 
-This software is Copyright (c) 2015 by Christian Hansen.
+This software is Copyright (c) 2016 by Christian Hansen.
 
 This is free software, licensed under:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/MANIFEST new/HTTP-Tiny-0.058/MANIFEST
--- old/HTTP-Tiny-0.056/MANIFEST        2015-05-19 12:00:48.000000000 +0200
+++ new/HTTP-Tiny-0.058/MANIFEST        2016-05-03 17:30:06.000000000 +0200
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest 
v5.036.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest 
v6.003.
 CONTRIBUTING.mkdn
 Changes
 LICENSE
@@ -46,6 +46,7 @@
 corpus/get-19.txt
 corpus/get-20.txt
 corpus/get-21.txt
+corpus/get-22.txt
 corpus/head-01.txt
 corpus/keepalive-01.txt
 corpus/keepalive-02.txt
@@ -116,10 +117,10 @@
 t/Util.pm
 xt/author/00-compile.t
 xt/author/critic.t
+xt/author/pod-coverage.t
 xt/author/pod-spell.t
+xt/author/pod-syntax.t
+xt/author/test-version.t
 xt/release/distmeta.t
 xt/release/minimum-version.t
-xt/release/pod-coverage.t
-xt/release/pod-syntax.t
 xt/release/portability.t
-xt/release/test-version.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/META.json 
new/HTTP-Tiny-0.058/META.json
--- old/HTTP-Tiny-0.056/META.json       2015-05-19 12:00:48.000000000 +0200
+++ new/HTTP-Tiny-0.058/META.json       2016-05-03 17:30:06.000000000 +0200
@@ -5,7 +5,7 @@
       "David Golden <dagol...@cpan.org>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 5.036, CPAN::Meta::Converter version 
2.150002",
+   "generated_by" : "Dist::Zilla version 6.003, CPAN::Meta::Converter version 
2.150001",
    "license" : [
       "perl_5"
    ],
@@ -16,10 +16,10 @@
    "name" : "HTTP-Tiny",
    "no_index" : {
       "directory" : [
-         "t",
-         "xt",
+         "corpus",
          "examples",
-         "corpus"
+         "t",
+         "xt"
       ],
       "package" : [
          "DB"
@@ -30,6 +30,9 @@
          "requires" : {
             "ExtUtils::MakeMaker" : "6.17",
             "perl" : "5.006"
+         },
+         "suggests" : {
+            "JSON::PP" : "2.27300"
          }
       },
       "develop" : {
@@ -38,26 +41,31 @@
             "Dist::Zilla::Plugin::Prereqs" : "0",
             "Dist::Zilla::Plugin::RemovePrereqs" : "0",
             "Dist::Zilla::PluginBundle::DAGOLDEN" : "0.072",
+            "English" : "0",
             "File::Spec" : "0",
             "File::Temp" : "0",
             "IO::Handle" : "0",
             "IPC::Open3" : "0",
             "Perl::Critic::Policy::Lax::ProhibitStringyEval::ExceptForRequire" 
: "0",
             "Pod::Coverage::TrustPod" : "0",
+            "Pod::Wordlist" : "0",
+            "Software::License::Perl_5" : "0",
             "Test::CPAN::Meta" : "0",
             "Test::More" : "0",
             "Test::Pod" : "1.41",
             "Test::Pod::Coverage" : "1.08",
             "Test::Spelling" : "0.12",
-            "Test::Version" : "1"
+            "Test::Version" : "1",
+            "blib" : "1.01",
+            "perl" : "5.006"
          }
       },
       "runtime" : {
          "recommends" : {
             "HTTP::CookieJar" : "0.001",
-            "IO::Socket::IP" : "0.25",
+            "IO::Socket::IP" : "0.32",
             "IO::Socket::SSL" : "1.42",
-            "Mozilla::CA" : "20130114",
+            "Mozilla::CA" : "20160104",
             "Net::SSLeay" : "1.49"
          },
          "requires" : {
@@ -65,6 +73,7 @@
             "Fcntl" : "0",
             "IO::Socket" : "0",
             "MIME::Base64" : "0",
+            "Socket" : "0",
             "Time::Local" : "0",
             "bytes" : "0",
             "perl" : "5.006",
@@ -99,7 +108,7 @@
    "provides" : {
       "HTTP::Tiny" : {
          "file" : "lib/HTTP/Tiny.pm",
-         "version" : "0.056"
+         "version" : "0.058"
       }
    },
    "release_status" : "stable",
@@ -114,16 +123,19 @@
          "web" : "https://github.com/chansen/p5-http-tiny";
       }
    },
-   "version" : "0.056",
+   "version" : "0.058",
    "x_authority" : "cpan:DAGOLDEN",
    "x_contributors" : [
       "Alan Gardner <gard...@pythian.com>",
       "Alessandro Ghedini <al3x...@gmail.com>",
+      "A. Sinan Unur <na...@cpan.org>",
       "Brad Gilbert <bgi...@cpan.org>",
+      "brian m. carlson <sand...@crustytoothpaste.net>",
       "Chris Nehren <apei...@cpan.org>",
       "Chris Weyl <cw...@alumni.drew.edu>",
       "Claes Jakobsson <cl...@surfar.nu>",
       "Clinton Gormley <cl...@traveljury.com>",
+      "David Golden <x...@xdg.me>",
       "Dean Pearce <pea...@pythian.com>",
       "Edward Zborowski <e...@rubensteintech.com>",
       "James Raspass <jrasp...@gmail.com>",
@@ -134,9 +146,10 @@
       "Martin-Louis Bright <mlbri...@gmail.com>",
       "Mike Doherty <dohe...@cpan.org>",
       "Olaf Alders <o...@wundersolutions.com>",
-      "Olivier Mengué <dol...@cpan.org>",
-      "Petr Písař <ppi...@redhat.com>",
-      "Sören Kornetzki <soeren.kornet...@delti.com>",
+      "Olivier Mengu\u00e9 <dol...@cpan.org>",
+      "Petr P\u00edsa\u0159 <ppi...@redhat.com>",
+      "SkyMarshal <skymarshal1...@gmail.com>",
+      "S\u00f6ren Kornetzki <soeren.kornet...@delti.com>",
       "Syohei YOSHIDA <syo...@gmail.com>",
       "Tatsuhiko Miyagawa <miyag...@bulknews.net>",
       "Tom Hukins <t...@eborcom.com>",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/META.yml new/HTTP-Tiny-0.058/META.yml
--- old/HTTP-Tiny-0.056/META.yml        2015-05-19 12:00:48.000000000 +0200
+++ new/HTTP-Tiny-0.058/META.yml        2016-05-03 17:30:06.000000000 +0200
@@ -21,7 +21,7 @@
   ExtUtils::MakeMaker: '6.17'
   perl: '5.006'
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 5.036, CPAN::Meta::Converter version 
2.150002'
+generated_by: 'Dist::Zilla version 6.003, CPAN::Meta::Converter version 
2.150001'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -29,27 +29,28 @@
 name: HTTP-Tiny
 no_index:
   directory:
+    - corpus
+    - examples
     - t
     - xt
-    - examples
-    - corpus
   package:
     - DB
 provides:
   HTTP::Tiny:
     file: lib/HTTP/Tiny.pm
-    version: '0.056'
+    version: '0.058'
 recommends:
   HTTP::CookieJar: '0.001'
-  IO::Socket::IP: '0.25'
+  IO::Socket::IP: '0.32'
   IO::Socket::SSL: '1.42'
-  Mozilla::CA: '20130114'
+  Mozilla::CA: '20160104'
   Net::SSLeay: '1.49'
 requires:
   Carp: '0'
   Fcntl: '0'
   IO::Socket: '0'
   MIME::Base64: '0'
+  Socket: '0'
   Time::Local: '0'
   bytes: '0'
   perl: '5.006'
@@ -59,16 +60,19 @@
   bugtracker: https://github.com/chansen/p5-http-tiny/issues
   homepage: https://github.com/chansen/p5-http-tiny
   repository: https://github.com/chansen/p5-http-tiny.git
-version: '0.056'
+version: '0.058'
 x_authority: cpan:DAGOLDEN
 x_contributors:
   - 'Alan Gardner <gard...@pythian.com>'
   - 'Alessandro Ghedini <al3x...@gmail.com>'
+  - 'A. Sinan Unur <na...@cpan.org>'
   - 'Brad Gilbert <bgi...@cpan.org>'
+  - 'brian m. carlson <sand...@crustytoothpaste.net>'
   - 'Chris Nehren <apei...@cpan.org>'
   - 'Chris Weyl <cw...@alumni.drew.edu>'
   - 'Claes Jakobsson <cl...@surfar.nu>'
   - 'Clinton Gormley <cl...@traveljury.com>'
+  - 'David Golden <x...@xdg.me>'
   - 'Dean Pearce <pea...@pythian.com>'
   - 'Edward Zborowski <e...@rubensteintech.com>'
   - 'James Raspass <jrasp...@gmail.com>'
@@ -81,6 +85,7 @@
   - 'Olaf Alders <o...@wundersolutions.com>'
   - 'Olivier Mengué <dol...@cpan.org>'
   - 'Petr Písař <ppi...@redhat.com>'
+  - 'SkyMarshal <skymarshal1...@gmail.com>'
   - 'Sören Kornetzki <soeren.kornet...@delti.com>'
   - 'Syohei YOSHIDA <syo...@gmail.com>'
   - 'Tatsuhiko Miyagawa <miyag...@bulknews.net>'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/Makefile.PL 
new/HTTP-Tiny-0.058/Makefile.PL
--- old/HTTP-Tiny-0.056/Makefile.PL     2015-05-19 12:00:48.000000000 +0200
+++ new/HTTP-Tiny-0.058/Makefile.PL     2016-05-03 17:30:06.000000000 +0200
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker 
v5.036.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker 
v6.003.
 use strict;
 use warnings;
 
@@ -13,7 +13,6 @@
     "ExtUtils::MakeMaker" => "6.17"
   },
   "DISTNAME" => "HTTP-Tiny",
-  "EXE_FILES" => [],
   "LICENSE" => "perl",
   "MIN_PERL_VERSION" => "5.006",
   "NAME" => "HTTP::Tiny",
@@ -22,6 +21,7 @@
     "Fcntl" => 0,
     "IO::Socket" => 0,
     "MIME::Base64" => 0,
+    "Socket" => 0,
     "Time::Local" => 0,
     "bytes" => 0,
     "strict" => 0,
@@ -41,7 +41,7 @@
     "Test::More" => "0.96",
     "open" => 0
   },
-  "VERSION" => "0.056",
+  "VERSION" => "0.058",
   "test" => {
     "TESTS" => "t/*.t"
   }
@@ -52,7 +52,7 @@
   "Carp" => 0,
   "Data::Dumper" => 0,
   "Exporter" => 0,
-  "ExtUtils::MakeMaker" => "6.17",
+  "ExtUtils::MakeMaker" => 0,
   "Fcntl" => 0,
   "File::Basename" => 0,
   "File::Spec" => 0,
@@ -63,6 +63,7 @@
   "IO::Socket::INET" => 0,
   "IPC::Cmd" => 0,
   "MIME::Base64" => 0,
+  "Socket" => 0,
   "Test::More" => "0.96",
   "Time::Local" => 0,
   "bytes" => 0,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/README new/HTTP-Tiny-0.058/README
--- old/HTTP-Tiny-0.056/README  2015-05-19 12:00:48.000000000 +0200
+++ new/HTTP-Tiny-0.058/README  2016-05-03 17:30:06.000000000 +0200
@@ -2,7 +2,7 @@
     HTTP::Tiny - A small, simple, correct HTTP/1.1 client
 
 VERSION
-    version 0.056
+    version 0.058
 
 SYNOPSIS
         use HTTP::Tiny;
@@ -75,7 +75,9 @@
         Must be a comma-separated string or an array reference. (default is
         $ENV{no_proxy} —)
 
-    *   "timeout" — Request timeout in seconds (default is 60)
+    *   "timeout" — Request timeout in seconds (default is 60) If a socket
+        open, read or write takes longer than the timeout, an exception is
+        thrown.
 
     *   "verify_SSL" — A boolean that indicates whether to validate the SSL
         certificate of an "https" — connection (default is false)
@@ -192,6 +194,12 @@
     *   "data_callback" — A code reference that will be called for each
         chunks of the response body received.
 
+    *   "peer" — Override host resolution and force all connections to go
+        only to a specific peer address, regardless of the URL of the
+        request. This will include any redirections! This options should be
+        used with extreme caution (e.g. debugging or very special
+        circumstances).
+
     The "Host" header is generated from the URL in accordance with RFC 2616.
     It is a fatal error to specify "Host" in the "headers" option. Other
     headers may be ignored or overwritten if necessary for transport
@@ -234,6 +242,10 @@
         will be an arrayref; it will otherwise be a scalar string containing
         the value
 
+    *   "redirects" If this field exists, it is an arrayref of response hash
+        references from redirects in the same order that redirections
+        occurred. If it does not exist, then no redirections occurred.
+
     On an exception during the execution of the request, the "status" field
     will contain 599, and the "content" field will contain the text of the
     exception.
@@ -265,6 +277,20 @@
     list context, returns the boolean and a (possibly multi-line) string of
     errors indicating why SSL isn't available.
 
+  connected
+        $host = $http->connected;
+        ($host, $port) = $http->connected;
+
+    Indicates if a connection to a peer is being kept alive, per the
+    "keep_alive" option.
+
+    In scalar context, returns the peer host and port, joined with a colon,
+    or "undef" (if no peer is connected). In list context, returns the peer
+    host and port or an empty list (if no peer is connected).
+
+    Note: This method cannot reliably be used to discover whether the remote
+    host has closed its end of the socket.
+
 SSL SUPPORT
     Direct "https" connections are supported only if IO::Socket::SSL 1.56 or
     greater and Net::SSLeay 1.49 or greater are installed. An exception will
@@ -305,11 +331,16 @@
     concerned about security, you should enable this option.
 
     Certificate verification requires a file containing trusted CA
-    certificates. If the Mozilla::CA module is installed, HTTP::Tiny will
-    use the CA file included with it as a source of trusted CA's. (This
-    means you trust Mozilla, the author of Mozilla::CA, the CPAN mirror
-    where you got Mozilla::CA, the toolchain used to install it, and your
-    operating system security, right?)
+    certificates.
+
+    If the environment variable "SSL_CERT_FILE" is present, HTTP::Tiny will
+    try to find a CA certificate file in that location.
+
+    If the Mozilla::CA module is installed, HTTP::Tiny will use the CA file
+    included with it as a source of trusted CA's. (This means you trust
+    Mozilla, the author of Mozilla::CA, the CPAN mirror where you got
+    Mozilla::CA, the toolchain used to install it, and your operating system
+    security, right?)
 
     If that module is not available, then HTTP::Tiny will search several
     system-specific default locations for a CA certificate file:
@@ -415,6 +446,11 @@
     *   There is no support for a Request-URI of '*' for the 'OPTIONS'
         request.
 
+    *   Headers mentioned in the RFCs and some other, well-known headers are
+        generated with their canonical case. Other headers are sent in the
+        case provided by the user. Except for control headers (which are
+        sent first), headers are sent in arbitrary order.
+
     Despite the limitations listed above, HTTP::Tiny is considered
     feature-complete. New feature requests should be directed to
     HTTP::Tiny::UA.
@@ -463,8 +499,12 @@
 
     *   Alessandro Ghedini <al3x...@gmail.com>
 
+    *   A. Sinan Unur <na...@cpan.org>
+
     *   Brad Gilbert <bgi...@cpan.org>
 
+    *   brian m. carlson <sand...@crustytoothpaste.net>
+
     *   Chris Nehren <apei...@cpan.org>
 
     *   Chris Weyl <cw...@alumni.drew.edu>
@@ -473,6 +513,8 @@
 
     *   Clinton Gormley <cl...@traveljury.com>
 
+    *   David Golden <x...@xdg.me>
+
     *   Dean Pearce <pea...@pythian.com>
 
     *   Edward Zborowski <e...@rubensteintech.com>
@@ -497,6 +539,8 @@
 
     *   Petr Písař <ppi...@redhat.com>
 
+    *   SkyMarshal <skymarshal1...@gmail.com>
+
     *   Sören Kornetzki <soeren.kornet...@delti.com>
 
     *   Syohei YOSHIDA <syo...@gmail.com>
@@ -508,7 +552,7 @@
     *   Tony Cook <t...@develop-help.com>
 
 COPYRIGHT AND LICENSE
-    This software is copyright (c) 2015 by Christian Hansen.
+    This software is copyright (c) 2016 by Christian Hansen.
 
     This is free software; you can redistribute it and/or modify it under
     the same terms as the Perl 5 programming language system itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/corpus/get-02.txt 
new/HTTP-Tiny-0.058/corpus/get-02.txt
--- old/HTTP-Tiny-0.056/corpus/get-02.txt       2015-05-19 12:00:48.000000000 
+0200
+++ new/HTTP-Tiny-0.058/corpus/get-02.txt       2016-05-03 17:30:06.000000000 
+0200
@@ -5,13 +5,17 @@
 headers
   Accept: */*
   X-Custom: This is a custom header
+  x-lower: This is a lower-case custom header
+  authorization: fake auth data
 ----------
 GET /index.html HTTP/1.1
 Host: example.com
 Accept: */*
+Authorization: fake auth data
 Connection: close
 User-Agent: HTTP-Tiny/VERSION
 X-Custom: This is a custom header
+x-lower: This is a lower-case custom header
 
 ----------
 HTTP/1.1 200 OK
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/corpus/get-22.txt 
new/HTTP-Tiny-0.058/corpus/get-22.txt
--- old/HTTP-Tiny-0.056/corpus/get-22.txt       1970-01-01 01:00:00.000000000 
+0100
+++ new/HTTP-Tiny-0.058/corpus/get-22.txt       2016-05-03 17:30:06.000000000 
+0200
@@ -0,0 +1,10 @@
+url
+  http://example.com/index.html
+expected_rc
+  599
+expected_like
+  Invalid HTTP header field
+headers
+  trailing-space : foo
+----------
+----------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/cpanfile new/HTTP-Tiny-0.058/cpanfile
--- old/HTTP-Tiny-0.056/cpanfile        2015-05-19 12:00:48.000000000 +0200
+++ new/HTTP-Tiny-0.058/cpanfile        2016-05-03 17:30:06.000000000 +0200
@@ -2,15 +2,16 @@
 requires "Fcntl" => "0";
 requires "IO::Socket" => "0";
 requires "MIME::Base64" => "0";
+requires "Socket" => "0";
 requires "Time::Local" => "0";
 requires "bytes" => "0";
 requires "perl" => "5.006";
 requires "strict" => "0";
 requires "warnings" => "0";
 recommends "HTTP::CookieJar" => "0.001";
-recommends "IO::Socket::IP" => "0.25";
+recommends "IO::Socket::IP" => "0.32";
 recommends "IO::Socket::SSL" => "1.42";
-recommends "Mozilla::CA" => "20130114";
+recommends "Mozilla::CA" => "20160104";
 recommends "Net::SSLeay" => "1.49";
 suggests "IO::Socket::SSL" => "1.56";
 
@@ -39,21 +40,30 @@
   requires "perl" => "5.006";
 };
 
+on 'configure' => sub {
+  suggests "JSON::PP" => "2.27300";
+};
+
 on 'develop' => sub {
   requires "Dist::Zilla" => "5";
   requires "Dist::Zilla::Plugin::Prereqs" => "0";
   requires "Dist::Zilla::Plugin::RemovePrereqs" => "0";
   requires "Dist::Zilla::PluginBundle::DAGOLDEN" => "0.072";
+  requires "English" => "0";
   requires "File::Spec" => "0";
   requires "File::Temp" => "0";
   requires "IO::Handle" => "0";
   requires "IPC::Open3" => "0";
   requires "Perl::Critic::Policy::Lax::ProhibitStringyEval::ExceptForRequire" 
=> "0";
   requires "Pod::Coverage::TrustPod" => "0";
+  requires "Pod::Wordlist" => "0";
+  requires "Software::License::Perl_5" => "0";
   requires "Test::CPAN::Meta" => "0";
   requires "Test::More" => "0";
   requires "Test::Pod" => "1.41";
   requires "Test::Pod::Coverage" => "1.08";
   requires "Test::Spelling" => "0.12";
   requires "Test::Version" => "1";
+  requires "blib" => "1.01";
+  requires "perl" => "5.006";
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/dist.ini new/HTTP-Tiny-0.058/dist.ini
--- old/HTTP-Tiny-0.056/dist.ini        2015-05-19 12:00:48.000000000 +0200
+++ new/HTTP-Tiny-0.058/dist.ini        2016-05-03 17:30:06.000000000 +0200
@@ -22,9 +22,9 @@
 
 [Prereqs / Recommends]
 HTTP::CookieJar = 0.001
-IO::Socket::IP = 0.25
+IO::Socket::IP = 0.32
 IO::Socket::SSL = 1.42
-Mozilla::CA = 20130114
+Mozilla::CA = 20160104
 Net::SSLeay = 1.49
 
 [Prereqs / Suggests]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/lib/HTTP/Tiny.pm 
new/HTTP-Tiny-0.058/lib/HTTP/Tiny.pm
--- old/HTTP-Tiny-0.056/lib/HTTP/Tiny.pm        2015-05-19 12:00:48.000000000 
+0200
+++ new/HTTP-Tiny-0.058/lib/HTTP/Tiny.pm        2016-05-03 17:30:06.000000000 
+0200
@@ -4,7 +4,7 @@
 use warnings;
 # ABSTRACT: A small, simple, correct HTTP/1.1 client
 
-our $VERSION = '0.056';
+our $VERSION = '0.058';
 
 use Carp ();
 
@@ -15,35 +15,34 @@
 #pod This constructor returns a new HTTP::Tiny object.  Valid attributes 
include:
 #pod
 #pod =for :list
-#pod * C<agent> —
-#pod     A user-agent string (defaults to 'HTTP-Tiny/$VERSION'). If C<agent> — 
ends in a space character, the default user-agent string is appended.
-#pod * C<cookie_jar> —
-#pod     An instance of L<HTTP::CookieJar> — or equivalent class that supports 
the C<add> and C<cookie_header> methods
-#pod * C<default_headers> —
-#pod     A hashref of default headers to apply to requests
-#pod * C<local_address> —
-#pod     The local IP address to bind to
-#pod * C<keep_alive> —
-#pod     Whether to reuse the last connection (if for the same scheme, host 
and port) (defaults to 1)
-#pod * C<max_redirect> —
-#pod     Maximum number of redirects allowed (defaults to 5)
-#pod * C<max_size> —
-#pod     Maximum response size in bytes (only when not using a data callback). 
 If defined, responses larger than this will return an exception.
-#pod * C<http_proxy> —
-#pod     URL of a proxy server to use for HTTP connections (default is 
C<$ENV{http_proxy}> — if set)
-#pod * C<https_proxy> —
-#pod     URL of a proxy server to use for HTTPS connections (default is 
C<$ENV{https_proxy}> — if set)
-#pod * C<proxy> —
-#pod     URL of a generic proxy server for both HTTP and HTTPS connections 
(default is C<$ENV{all_proxy}> — if set)
-#pod * C<no_proxy> —
-#pod     List of domain suffixes that should not be proxied.  Must be a 
comma-separated string or an array reference. (default is C<$ENV{no_proxy}> —)
-#pod * C<timeout> —
-#pod     Request timeout in seconds (default is 60)
-#pod * C<verify_SSL> —
-#pod     A boolean that indicates whether to validate the SSL certificate of 
an C<https> —
-#pod     connection (default is false)
-#pod * C<SSL_options> —
-#pod     A hashref of C<SSL_*> — options to pass through to L<IO::Socket::SSL>
+#pod * C<agent> — A user-agent string (defaults to 'HTTP-Tiny/$VERSION'). If
+#pod   C<agent> — ends in a space character, the default user-agent string is
+#pod   appended.
+#pod * C<cookie_jar> — An instance of L<HTTP::CookieJar> — or equivalent class
+#pod   that supports the C<add> and C<cookie_header> methods
+#pod * C<default_headers> — A hashref of default headers to apply to requests
+#pod * C<local_address> — The local IP address to bind to
+#pod * C<keep_alive> — Whether to reuse the last connection (if for the same
+#pod   scheme, host and port) (defaults to 1)
+#pod * C<max_redirect> — Maximum number of redirects allowed (defaults to 5)
+#pod * C<max_size> — Maximum response size in bytes (only when not using a data
+#pod   callback).  If defined, responses larger than this will return an
+#pod   exception.
+#pod * C<http_proxy> — URL of a proxy server to use for HTTP connections
+#pod   (default is C<$ENV{http_proxy}> — if set)
+#pod * C<https_proxy> — URL of a proxy server to use for HTTPS connections
+#pod   (default is C<$ENV{https_proxy}> — if set)
+#pod * C<proxy> — URL of a generic proxy server for both HTTP and HTTPS
+#pod   connections (default is C<$ENV{all_proxy}> — if set)
+#pod * C<no_proxy> — List of domain suffixes that should not be proxied.  Must
+#pod   be a comma-separated string or an array reference. (default is
+#pod   C<$ENV{no_proxy}> —)
+#pod * C<timeout> — Request timeout in seconds (default is 60) If a socket 
open,
+#pod   read or write takes longer than the timeout, an exception is thrown.
+#pod * C<verify_SSL> — A boolean that indicates whether to validate the SSL
+#pod   certificate of an C<https> — connection (default is false)
+#pod * C<SSL_options> — A hashref of C<SSL_*> — options to pass through to
+#pod   L<IO::Socket::SSL>
 #pod
 #pod Passing an explicit C<undef> for C<proxy>, C<http_proxy> or 
C<https_proxy> will
 #pod prevent getting the corresponding proxies from the environment.
@@ -66,7 +65,7 @@
 BEGIN {
     @attributes = qw(
         cookie_jar default_headers http_proxy https_proxy keep_alive
-        local_address max_redirect max_size proxy no_proxy timeout
+        local_address max_redirect max_size proxy no_proxy
         SSL_options verify_SSL
     );
     my %persist_ok = map {; $_ => 1 } qw(
@@ -95,6 +94,17 @@
     return $self->{agent};
 }
 
+sub timeout {
+    my ($self, $timeout) = @_;
+    if ( @_ > 1 ) {
+        $self->{timeout} = $timeout;
+        if ($self->{handle}) {
+            $self->{handle}->timeout($timeout);
+        }
+    }
+    return $self->{timeout};
+}
+
 sub new {
     my($class, %args) = @_;
 
@@ -337,6 +347,11 @@
 #pod * C<data_callback> —
 #pod     A code reference that will be called for each chunks of the response
 #pod     body received.
+#pod * C<peer> —
+#pod     Override host resolution and force all connections to go only to a
+#pod     specific peer address, regardless of the URL of the request.  This 
will
+#pod     include any redirections!  This options should be used with extreme
+#pod     caution (e.g. debugging or very special circumstances).
 #pod
 #pod The C<Host> header is generated from the URL in accordance with RFC 2616. 
 It
 #pod is a fatal error to specify C<Host> in the C<headers> option.  Other 
headers
@@ -378,6 +393,10 @@
 #pod     A hashref of header fields.  All header field names will be normalized
 #pod     to be lower case. If a header is repeated, the value will be an 
arrayref;
 #pod     it will otherwise be a scalar string containing the value
+#pod * C<redirects>
+#pod     If this field exists, it is an arrayref of response hash references 
from
+#pod     redirects in the same order that redirections occurred.  If it does
+#pod     not exist, then no redirections occurred.
 #pod
 #pod On an exception during the execution of the request, the C<status> field 
will
 #pod contain 599, and the C<content> field will contain the text of the 
exception.
@@ -511,6 +530,41 @@
     wantarray ? ($ok, $reason) : $ok;
 }
 
+#pod =method connected
+#pod
+#pod     $host = $http->connected;
+#pod     ($host, $port) = $http->connected;
+#pod
+#pod Indicates if a connection to a peer is being kept alive, per the 
C<keep_alive>
+#pod option.
+#pod
+#pod In scalar context, returns the peer host and port, joined with a colon, or
+#pod C<undef> (if no peer is connected).
+#pod In list context, returns the peer host and port or an empty list (if no 
peer
+#pod is connected).
+#pod
+#pod B<Note>: This method cannot reliably be used to discover whether the 
remote
+#pod host has closed its end of the socket.
+#pod
+#pod =cut
+
+sub connected {
+    my ($self) = @_;
+
+    # If a socket exists...
+    if ($self->{handle} && $self->{handle}{fh}) {
+        my $socket = $self->{handle}{fh};
+
+        # ...and is connected, return the peer host and port.
+        if ($socket->connected) {
+            return wantarray
+                ? ($socket->peerhost, $socket->peerport)
+                : join(':', $socket->peerhost, $socket->peerport);
+        }
+    }
+    return;
+}
+
 #--------------------------------------------------------------------------#
 # private methods
 #--------------------------------------------------------------------------#
@@ -541,17 +595,19 @@
         headers   => {},
     };
 
+    my $peer = $args->{peer} || $host;
+
     # We remove the cached handle so it is not reused in the case of redirect.
     # If all is well, it will be recached at the end of _request.  We only
     # reuse for the same scheme, host and port
     my $handle = delete $self->{handle};
     if ( $handle ) {
-        unless ( $handle->can_reuse( $scheme, $host, $port ) ) {
+        unless ( $handle->can_reuse( $scheme, $host, $port, $peer ) ) {
             $handle->close;
             undef $handle;
         }
     }
-    $handle ||= $self->_open_handle( $request, $scheme, $host, $port );
+    $handle ||= $self->_open_handle( $request, $scheme, $host, $port, $peer );
 
     $self->_prepare_headers_and_cb($request, $args, $url, $auth);
     $handle->write_request($request);
@@ -561,11 +617,7 @@
         until (substr($response->{status},0,1) ne '1');
 
     $self->_update_cookie_jar( $url, $response ) if $self->{cookie_jar};
-
-    if ( my @redir_args = $self->_maybe_redirect($request, $response, $args) ) 
{
-        $handle->close;
-        return $self->_request(@redir_args, $args);
-    }
+    my @redir_args = $self->_maybe_redirect($request, $response, $args);
 
     my $known_message_length;
     if ($method eq 'HEAD' || $response->{status} =~ /^[23]04/) {
@@ -573,7 +625,9 @@
         $known_message_length = 1;
     }
     else {
-        my $data_cb = $self->_prepare_data_cb($response, $args);
+        # Ignore any data callbacks during redirection.
+        my $cb_args = @redir_args ? +{} : $args;
+        my $data_cb = $self->_prepare_data_cb($response, $cb_args);
         $known_message_length = $handle->read_body($data_cb, $response);
     }
 
@@ -590,11 +644,21 @@
 
     $response->{success} = substr( $response->{status}, 0, 1 ) eq '2';
     $response->{url} = $url;
+
+    # Push the current response onto the stack of redirects if redirecting.
+    if (@redir_args) {
+        push @{$args->{_redirects}}, $response;
+        return $self->_request(@redir_args, $args);
+    }
+
+    # Copy the stack of redirects into the response before returning.
+    $response->{redirects} = delete $args->{_redirects}
+      if @{$args->{_redirects}};
     return $response;
 }
 
 sub _open_handle {
-    my ($self, $request, $scheme, $host, $port) = @_;
+    my ($self, $request, $scheme, $host, $port, $peer) = @_;
 
     my $handle  = HTTP::Tiny::Handle->new(
         timeout         => $self->{timeout},
@@ -608,7 +672,7 @@
         return $self->_proxy_connect( $request, $handle );
     }
     else {
-        return $handle->connect($scheme, $host, $port);
+        return $handle->connect($scheme, $host, $port, $peer);
     }
 }
 
@@ -634,7 +698,7 @@
         $self->_add_basic_auth_header( $request, 'proxy-authorization' => 
$p_auth );
     }
 
-    $handle->connect($p_scheme, $p_host, $p_port);
+    $handle->connect($p_scheme, $p_host, $p_port, $p_host);
 
     if ($request->{scheme} eq 'https') {
         $self->_create_proxy_tunnel( $request, $handle );
@@ -708,6 +772,7 @@
         next unless defined;
         while (my ($k, $v) = each %$_) {
             $request->{headers}{lc $k} = $v;
+            $request->{header_case}{lc $k} = $k;
         }
     }
 
@@ -815,9 +880,11 @@
     my ($self, $request, $response, $args) = @_;
     my $headers = $response->{headers};
     my ($status, $method) = ($response->{status}, $request->{method});
+    $args->{_redirects} ||= [];
+
     if (($status eq '303' or ($status =~ /^30[1278]/ && $method =~ 
/^GET|HEAD$/))
         and $headers->{location}
-        and ++$args->{redirects} <= $self->{max_redirect}
+        and @{$args->{_redirects}} < $self->{max_redirect}
     ) {
         my $location = ($headers->{location} =~ /^\//)
             ? "$request->{scheme}://$request->{host_port}$headers->{location}"
@@ -913,6 +980,7 @@
 
 use Errno      qw[EINTR EPIPE];
 use IO::Socket qw[SOCK_STREAM];
+use Socket     qw[SOL_SOCKET SO_KEEPALIVE];
 
 # PERL_HTTP_TINY_IPV4_ONLY is a private environment variable to force old
 # behavior if someone is unable to boostrap CPAN from a new perl install; it is
@@ -934,6 +1002,7 @@
 };
 
 my $Token = 
qr/[\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E-\x7A\x7C\x7E]/;
+my $Field_Content = qr/[[:print:]]+ (?: [\x20\x09]+ [[:print:]]+ )*/x;
 
 sub new {
     my ($class, %args) = @_;
@@ -948,9 +1017,20 @@
     }, $class;
 }
 
+sub timeout {
+    my ($self, $timeout) = @_;
+    if ( @_ > 1 ) {
+        $self->{timeout} = $timeout;
+        if ( $self->{fh} && $self->{fh}->can('timeout') ) {
+            $self->{fh}->timeout($timeout);
+        }
+    }
+    return $self->{timeout};
+}
+
 sub connect {
-    @_ == 4 || die(q/Usage: $handle->connect(scheme, host, port)/ . "\n");
-    my ($self, $scheme, $host, $port) = @_;
+    @_ == 5 || die(q/Usage: $handle->connect(scheme, host, port, peer)/ . 
"\n");
+    my ($self, $scheme, $host, $port, $peer) = @_;
 
     if ( $scheme eq 'https' ) {
         $self->_assert_ssl;
@@ -959,23 +1039,30 @@
       die(qq/Unsupported URL scheme '$scheme'\n/);
     }
     $self->{fh} = $SOCKET_CLASS->new(
-        PeerHost  => $host,
+        PeerHost  => $peer,
         PeerPort  => $port,
         $self->{local_address} ?
             ( LocalAddr => $self->{local_address} ) : (),
         Proto     => 'tcp',
         Type      => SOCK_STREAM,
         Timeout   => $self->{timeout},
-        KeepAlive => !!$self->{keep_alive}
     ) or die(qq/Could not connect to '$host:$port': $@\n/);
 
     binmode($self->{fh})
       or die(qq/Could not binmode() socket: '$!'\n/);
 
+    if ( $self->{keep_alive} ) {
+        unless ( defined( $self->{fh}->setsockopt( SOL_SOCKET, SO_KEEPALIVE, 1 
) ) ) {
+            CORE::close($self->{fh});
+            die(qq/Could not set SO_KEEPALIVE on socket: '$!'\n/);
+        }
+    }
+
     $self->start_ssl($host) if $scheme eq 'https';
 
     $self->{scheme} = $scheme;
     $self->{host} = $host;
+    $self->{peer} = $peer;
     $self->{port} = $port;
     $self->{pid} = $$;
     $self->{tid} = _get_tid();
@@ -1172,38 +1259,72 @@
 sub write_request {
     @_ == 2 || die(q/Usage: $handle->write_request(request)/ . "\n");
     my($self, $request) = @_;
-    $self->write_request_header(@{$request}{qw/method uri headers/});
+    $self->write_request_header(@{$request}{qw/method uri headers 
header_case/});
     $self->write_body($request) if $request->{cb};
     return;
 }
 
-my %HeaderCase = (
-    'content-md5'      => 'Content-MD5',
-    'etag'             => 'ETag',
-    'te'               => 'TE',
-    'www-authenticate' => 'WWW-Authenticate',
-    'x-xss-protection' => 'X-XSS-Protection',
+# Standard request header names/case from HTTP/1.1 RFCs
+my @rfc_request_headers = qw(
+  Accept Accept-Charset Accept-Encoding Accept-Language Authorization
+  Cache-Control Connection Content-Length Expect From Host
+  If-Match If-Modified-Since If-None-Match If-Range If-Unmodified-Since
+  Max-Forwards Pragma Proxy-Authorization Range Referer TE Trailer
+  Transfer-Encoding Upgrade User-Agent Via
+);
+
+my @other_request_headers = qw(
+  Content-Encoding Content-MD5 Content-Type Cookie DNT Date Origin
+  X-XSS-Protection
 );
 
+my %HeaderCase = map { lc($_) => $_ } @rfc_request_headers, 
@other_request_headers;
+
 # to avoid multiple small writes and hence nagle, you can pass the method line 
or anything else to
 # combine writes.
 sub write_header_lines {
-    (@_ == 2 || @_ == 3 && ref $_[1] eq 'HASH') || die(q/Usage: 
$handle->write_header_lines(headers[,prefix])/ . "\n");
-    my($self, $headers, $prefix_data) = @_;
+    (@_ >= 2 && @_ <= 4 && ref $_[1] eq 'HASH') || die(q/Usage: 
$handle->write_header_lines(headers, [header_case, prefix])/ . "\n");
+    my($self, $headers, $header_case, $prefix_data) = @_;
+    $header_case ||= {};
 
     my $buf = (defined $prefix_data ? $prefix_data : '');
+
+    # Per RFC, control fields should be listed first
+    my %seen;
+    for my $k ( qw/host cache-control expect max-forwards pragma range te/ ) {
+        next unless exists $headers->{$k};
+        $seen{$k}++;
+        my $field_name = $HeaderCase{$k};
+        my $v = $headers->{$k};
+        for (ref $v eq 'ARRAY' ? @$v : $v) {
+            $_ = '' unless defined $_;
+            $buf .= "$field_name: $_\x0D\x0A";
+        }
+    }
+
+    # Other headers sent in arbitrary order
     while (my ($k, $v) = each %$headers) {
         my $field_name = lc $k;
+        next if $seen{$field_name};
         if (exists $HeaderCase{$field_name}) {
             $field_name = $HeaderCase{$field_name};
         }
         else {
+            if (exists $header_case->{$field_name}) {
+                $field_name = $header_case->{$field_name};
+            }
+            else {
+                $field_name =~ s/\b(\w)/\u$1/g;
+            }
             $field_name =~ /\A $Token+ \z/xo
               or die(q/Invalid HTTP header field name: / . 
$Printable->($field_name) . "\n");
-            $field_name =~ s/\b(\w)/\u$1/g;
             $HeaderCase{lc $field_name} = $field_name;
         }
         for (ref $v eq 'ARRAY' ? @$v : $v) {
+            # unwrap a field value if pre-wrapped by user
+            s/\x0D?\x0A\s+/ /g;
+            die(qq/Invalid HTTP header field value ($field_name): / . 
$Printable->($_). "\n")
+              unless $_ eq '' || /\A $Field_Content \z/xo;
             $_ = '' unless defined $_;
             $buf .= "$field_name: $_\x0D\x0A";
         }
@@ -1358,10 +1479,10 @@
 }
 
 sub write_request_header {
-    @_ == 4 || die(q/Usage: $handle->write_request_header(method, request_uri, 
headers)/ . "\n");
-    my ($self, $method, $request_uri, $headers) = @_;
+    @_ == 5 || die(q/Usage: $handle->write_request_header(method, request_uri, 
headers, header_case)/ . "\n");
+    my ($self, $method, $request_uri, $headers, $header_case) = @_;
 
-    return $self->write_header_lines($headers, "$method $request_uri 
HTTP/1.1\x0D\x0A");
+    return $self->write_header_lines($headers, $header_case, "$method 
$request_uri HTTP/1.1\x0D\x0A");
 }
 
 sub _do_timeout {
@@ -1416,7 +1537,7 @@
 }
 
 sub can_reuse {
-    my ($self,$scheme,$host,$port) = @_;
+    my ($self,$scheme,$host,$port,$peer) = @_;
     return 0 if
         $self->{pid} != $$
         || $self->{tid} != _get_tid()
@@ -1424,6 +1545,7 @@
         || $scheme ne $self->{scheme}
         || $host ne $self->{host}
         || $port ne $self->{port}
+        || $peer ne $self->{peer}
         || eval { $self->can_read(0) }
         || $@ ;
         return 1;
@@ -1434,11 +1556,16 @@
 sub _find_CA_file {
     my $self = shift();
 
-    if ( $self->{SSL_options}->{SSL_ca_file} ) {
-        unless ( -r $self->{SSL_options}->{SSL_ca_file} ) {
-            die qq/SSL_ca_file '$self->{SSL_options}->{SSL_ca_file}' not found 
or not readable\n/;
+    my $ca_file =
+      defined( $self->{SSL_options}->{SSL_ca_file} )
+      ? $self->{SSL_options}->{SSL_ca_file}
+      : $ENV{SSL_CERT_FILE};
+
+    if ( defined $ca_file ) {
+        unless ( -r $ca_file ) {
+            die qq/SSL_ca_file '$ca_file' not found or not readable\n/;
         }
-        return $self->{SSL_options}->{SSL_ca_file};
+        return $ca_file;
     }
 
     return Mozilla::CA::SSL_ca_file()
@@ -1512,7 +1639,7 @@
 
 =head1 VERSION
 
-version 0.056
+version 0.058
 
 =head1 SYNOPSIS
 
@@ -1601,7 +1728,7 @@
 
 =item *
 
-C<timeout> — Request timeout in seconds (default is 60)
+C<timeout> — Request timeout in seconds (default is 60) If a socket open, read 
or write takes longer than the timeout, an exception is thrown.
 
 =item *
 
@@ -1721,6 +1848,10 @@
 
 C<data_callback> — A code reference that will be called for each chunks of the 
response body received.
 
+=item *
+
+C<peer> — Override host resolution and force all connections to go only to a 
specific peer address, regardless of the URL of the request.  This will include 
any redirections!  This options should be used with extreme caution (e.g. 
debugging or very special circumstances).
+
 =back
 
 The C<Host> header is generated from the URL in accordance with RFC 2616.  It
@@ -1770,6 +1901,10 @@
 
 C<headers> — A hashref of header fields.  All header field names will be 
normalized to be lower case. If a header is repeated, the value will be an 
arrayref; it will otherwise be a scalar string containing the value
 
+=item *
+
+C<redirects> If this field exists, it is an arrayref of response hash 
references from redirects in the same order that redirections occurred.  If it 
does not exist, then no redirections occurred.
+
 =back
 
 On an exception during the execution of the request, the C<status> field will
@@ -1802,6 +1937,22 @@
 In list context, returns the boolean and a (possibly multi-line) string of
 errors indicating why SSL isn't available.
 
+=head2 connected
+
+    $host = $http->connected;
+    ($host, $port) = $http->connected;
+
+Indicates if a connection to a peer is being kept alive, per the C<keep_alive>
+option.
+
+In scalar context, returns the peer host and port, joined with a colon, or
+C<undef> (if no peer is connected).
+In list context, returns the peer host and port or an empty list (if no peer
+is connected).
+
+B<Note>: This method cannot reliably be used to discover whether the remote
+host has closed its end of the socket.
+
 =for Pod::Coverage SSL_options
 agent
 cookie_jar
@@ -1863,6 +2014,10 @@
 concerned about security, you should enable this option.
 
 Certificate verification requires a file containing trusted CA certificates.
+
+If the environment variable C<SSL_CERT_FILE> is present, HTTP::Tiny
+will try to find a CA certificate file in that location.
+
 If the L<Mozilla::CA> module is installed, HTTP::Tiny will use the CA file
 included with it as a source of trusted CA's.  (This means you trust Mozilla,
 the author of Mozilla::CA, the CPAN mirror where you got Mozilla::CA, the
@@ -2021,6 +2176,13 @@
 
 There is no support for a Request-URI of '*' for the 'OPTIONS' request.
 
+=item *
+
+Headers mentioned in the RFCs and some other, well-known headers are
+generated with their canonical case.  Other headers are sent in the
+case provided by the user.  Except for control headers (which are sent first),
+headers are sent in arbitrary order.
+
 =back
 
 Despite the limitations listed above, HTTP::Tiny is considered
@@ -2100,7 +2262,7 @@
 
 =head1 CONTRIBUTORS
 
-=for stopwords Alan Gardner Alessandro Ghedini Brad Gilbert Chris Nehren Weyl 
Claes Jakobsson Clinton Gormley Dean Pearce Edward Zborowski James Raspass 
Jeremy Mates Jess Robinson Lukas Eklund Martin J. Evans Martin-Louis Bright 
Mike Doherty Olaf Alders Olivier Mengué Petr Písař Sören Kornetzki Syohei 
YOSHIDA Tatsuhiko Miyagawa Tom Hukins Tony Cook
+=for stopwords Alan Gardner Alessandro Ghedini A. Sinan Unur Brad Gilbert 
brian m. carlson Chris Nehren Weyl Claes Jakobsson Clinton Gormley David Golden 
Dean Pearce Edward Zborowski James Raspass Jeremy Mates Jess Robinson Lukas 
Eklund Martin J. Evans Martin-Louis Bright Mike Doherty Olaf Alders Olivier 
Mengué Petr Písař SkyMarshal Sören Kornetzki Syohei YOSHIDA Tatsuhiko Miyagawa 
Tom Hukins Tony Cook
 
 =over 4
 
@@ -2114,10 +2276,18 @@
 
 =item *
 
+A. Sinan Unur <na...@cpan.org>
+
+=item *
+
 Brad Gilbert <bgi...@cpan.org>
 
 =item *
 
+brian m. carlson <sand...@crustytoothpaste.net>
+
+=item *
+
 Chris Nehren <apei...@cpan.org>
 
 =item *
@@ -2134,6 +2304,10 @@
 
 =item *
 
+David Golden <x...@xdg.me>
+
+=item *
+
 Dean Pearce <pea...@pythian.com>
 
 =item *
@@ -2182,6 +2356,10 @@
 
 =item *
 
+SkyMarshal <skymarshal1...@gmail.com>
+
+=item *
+
 Sören Kornetzki <soeren.kornet...@delti.com>
 
 =item *
@@ -2204,7 +2382,7 @@
 
 =head1 COPYRIGHT AND LICENSE
 
-This software is copyright (c) 2015 by Christian Hansen.
+This software is copyright (c) 2016 by Christian Hansen.
 
 This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/t/00-report-prereqs.dd 
new/HTTP-Tiny-0.058/t/00-report-prereqs.dd
--- old/HTTP-Tiny-0.056/t/00-report-prereqs.dd  2015-05-19 12:00:48.000000000 
+0200
+++ new/HTTP-Tiny-0.058/t/00-report-prereqs.dd  2016-05-03 17:30:06.000000000 
+0200
@@ -3,6 +3,9 @@
                         'requires' => {
                                         'ExtUtils::MakeMaker' => '6.17',
                                         'perl' => '5.006'
+                                      },
+                        'suggests' => {
+                                        'JSON::PP' => '2.27300'
                                       }
                       },
        'develop' => {
@@ -11,26 +14,31 @@
                                       'Dist::Zilla::Plugin::Prereqs' => '0',
                                       'Dist::Zilla::Plugin::RemovePrereqs' => 
'0',
                                       'Dist::Zilla::PluginBundle::DAGOLDEN' => 
'0.072',
+                                      'English' => '0',
                                       'File::Spec' => '0',
                                       'File::Temp' => '0',
                                       'IO::Handle' => '0',
                                       'IPC::Open3' => '0',
                                       
'Perl::Critic::Policy::Lax::ProhibitStringyEval::ExceptForRequire' => '0',
                                       'Pod::Coverage::TrustPod' => '0',
+                                      'Pod::Wordlist' => '0',
+                                      'Software::License::Perl_5' => '0',
                                       'Test::CPAN::Meta' => '0',
                                       'Test::More' => '0',
                                       'Test::Pod' => '1.41',
                                       'Test::Pod::Coverage' => '1.08',
                                       'Test::Spelling' => '0.12',
-                                      'Test::Version' => '1'
+                                      'Test::Version' => '1',
+                                      'blib' => '1.01',
+                                      'perl' => '5.006'
                                     }
                     },
        'runtime' => {
                       'recommends' => {
                                         'HTTP::CookieJar' => '0.001',
-                                        'IO::Socket::IP' => '0.25',
+                                        'IO::Socket::IP' => '0.32',
                                         'IO::Socket::SSL' => '1.42',
-                                        'Mozilla::CA' => '20130114',
+                                        'Mozilla::CA' => '20160104',
                                         'Net::SSLeay' => '1.49'
                                       },
                       'requires' => {
@@ -38,6 +46,7 @@
                                       'Fcntl' => '0',
                                       'IO::Socket' => '0',
                                       'MIME::Base64' => '0',
+                                      'Socket' => '0',
                                       'Time::Local' => '0',
                                       'bytes' => '0',
                                       'perl' => '5.006',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/t/00-report-prereqs.t 
new/HTTP-Tiny-0.058/t/00-report-prereqs.t
--- old/HTTP-Tiny-0.056/t/00-report-prereqs.t   2015-05-19 12:00:48.000000000 
+0200
+++ new/HTTP-Tiny-0.058/t/00-report-prereqs.t   2016-05-03 17:30:06.000000000 
+0200
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.021
+# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.024
 
 use Test::More tests => 1;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/t/001_api.t 
new/HTTP-Tiny-0.058/t/001_api.t
--- old/HTTP-Tiny-0.056/t/001_api.t     2015-05-19 12:00:48.000000000 +0200
+++ new/HTTP-Tiny-0.058/t/001_api.t     2016-05-03 17:30:06.000000000 +0200
@@ -12,6 +12,7 @@
 );
 my @methods   = qw(
   new get head put post delete post_form request mirror www_form_urlencode 
can_ssl
+  connected
 );
 
 my %api;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/t/100_get.t 
new/HTTP-Tiny-0.058/t/100_get.t
--- old/HTTP-Tiny-0.056/t/100_get.t     2015-05-19 12:00:48.000000000 +0200
+++ new/HTTP-Tiny-0.058/t/100_get.t     2016-05-03 17:30:06.000000000 +0200
@@ -104,6 +104,9 @@
   else {
     $check_expected->( $response->{content}, "$label content" );
   }
+
+  ok ( ! exists $response->{redirects}, "$label redirects array doesn't exist")
+    or diag explain $response->{redirects};
 }
 
 done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/t/110_mirror.t 
new/HTTP-Tiny-0.058/t/110_mirror.t
--- old/HTTP-Tiny-0.056/t/110_mirror.t  2015-05-19 12:00:48.000000000 +0200
+++ new/HTTP-Tiny-0.058/t/110_mirror.t  2016-05-03 17:30:06.000000000 +0200
@@ -51,6 +51,11 @@
     open my $fh, ">", $tempfile;
     close $fh;
     utime $mtime, $mtime, $tempfile;
+    if ($^O eq 'MSWin32') {
+        # Deal with stat and daylight savings issues on Windows
+        # by reading back mtime
+        $timestamp{$url_basename} = (stat $tempfile)[9];
+    }
   }
 
   # setup mocking and test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/t/130_redirect.t 
new/HTTP-Tiny-0.058/t/130_redirect.t
--- old/HTTP-Tiny-0.056/t/130_redirect.t        2015-05-19 12:00:48.000000000 
+0200
+++ new/HTTP-Tiny-0.058/t/130_redirect.t        2016-05-03 17:30:06.000000000 
+0200
@@ -17,6 +17,7 @@
   my $data = do { local (@ARGV,$/) = $file; <> };
   my ($params, @case_pairs) = split /--+\n/, $data;
   my $case = parse_case($params);
+  my $number_of_requests = @case_pairs / 2;
 
   my $url = $case->{url}[0];
   my $method = $case->{method}[0] || 'GET';
@@ -49,9 +50,8 @@
 
   my $http = HTTP::Tiny->new(keep_alive => 0, %new_args);
   my $response  = $http->request(@$call_args);
-
-  my $calls = 0
-    + (defined($new_args{max_redirect}) ? $new_args{max_redirect} : 5);
+  my $max_redirects = defined($new_args{max_redirect}) ? 
$new_args{max_redirect} : 5;
+  my $calls = 0 + $max_redirects;
 
   for my $i ( 0 .. $calls ) {
     last unless @socket_pairs;
@@ -66,6 +66,12 @@
 
   is ( $response->{content}, $exp_content, "$label content" );
 
+  my $number_of_redirects =
+    $max_redirects < $number_of_requests ? $max_redirects : 
$number_of_requests - 1;
+  is ( @{ $response->{redirects} || [] }, $number_of_redirects,
+      "$label redirects array size"
+  ) or diag explain $response->{redirects};
+
   if ( $case->{expected_url} ) {
     is ( $response->{url}, $case->{expected_url}[0], "$label response URL" );
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/t/Util.pm 
new/HTTP-Tiny-0.058/t/Util.pm
--- old/HTTP-Tiny-0.056/t/Util.pm       2015-05-19 12:00:48.000000000 +0200
+++ new/HTTP-Tiny-0.058/t/Util.pm       2016-05-03 17:30:06.000000000 +0200
@@ -151,9 +151,10 @@
         *HTTP::Tiny::Handle::can_read = sub {1};
         *HTTP::Tiny::Handle::can_write = sub {1};
         *HTTP::Tiny::Handle::connect = sub {
-            my ($self, $scheme, $host, $port) = @_;
+            my ($self, $scheme, $host, $port, $peer) = @_;
             $self->{host}   = $monkey_host = $host;
             $self->{port}   = $monkey_port = $port;
+            $self->{peer}   = $peer;
             $self->{scheme} = $scheme;
             $self->{fh} = shift @req_fh;
             $self->{pid} = $$;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/xt/author/00-compile.t 
new/HTTP-Tiny-0.058/xt/author/00-compile.t
--- old/HTTP-Tiny-0.056/xt/author/00-compile.t  2015-05-19 12:00:48.000000000 
+0200
+++ new/HTTP-Tiny-0.058/xt/author/00-compile.t  2016-05-03 17:30:06.000000000 
+0200
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.052
+# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.054
 
 use Test::More;
 
@@ -39,6 +39,9 @@
     waitpid($pid, 0);
     is($?, 0, "$lib loaded ok");
 
+    shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
+        and not eval { require blib; blib->VERSION('1.01') };
+
     if (@_warnings)
     {
         warn @_warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/xt/author/pod-coverage.t 
new/HTTP-Tiny-0.058/xt/author/pod-coverage.t
--- old/HTTP-Tiny-0.056/xt/author/pod-coverage.t        1970-01-01 
01:00:00.000000000 +0100
+++ new/HTTP-Tiny-0.058/xt/author/pod-coverage.t        2016-05-03 
17:30:06.000000000 +0200
@@ -0,0 +1,7 @@
+#!perl
+# This file was automatically generated by 
Dist::Zilla::Plugin::PodCoverageTests.
+
+use Test::Pod::Coverage 1.08;
+use Pod::Coverage::TrustPod;
+
+all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/xt/author/pod-spell.t 
new/HTTP-Tiny-0.058/xt/author/pod-spell.t
--- old/HTTP-Tiny-0.056/xt/author/pod-spell.t   2015-05-19 12:00:48.000000000 
+0200
+++ new/HTTP-Tiny-0.058/xt/author/pod-spell.t   2016-05-03 17:30:06.000000000 
+0200
@@ -2,7 +2,7 @@
 use warnings;
 use Test::More;
 
-# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006009
+# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007000
 use Test::Spelling 0.12;
 use Pod::Wordlist;
 
@@ -26,9 +26,15 @@
 Alessandro
 Ghedini
 al3xbio
+Sinan
+Unur
+nanis
 Brad
 Gilbert
 bgills
+brian
+carlson
+sandals
 Chris
 Nehren
 apeiron
@@ -40,6 +46,7 @@
 Clinton
 Gormley
 clint
+xdg
 Dean
 Pearce
 pearce
@@ -75,6 +82,8 @@
 Petr
 Písař
 ppisar
+SkyMarshal
+skymarshal1729
 Sören
 Kornetzki
 soeren
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/xt/author/pod-syntax.t 
new/HTTP-Tiny-0.058/xt/author/pod-syntax.t
--- old/HTTP-Tiny-0.056/xt/author/pod-syntax.t  1970-01-01 01:00:00.000000000 
+0100
+++ new/HTTP-Tiny-0.058/xt/author/pod-syntax.t  2016-05-03 17:30:06.000000000 
+0200
@@ -0,0 +1,7 @@
+#!perl
+# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
+use strict; use warnings;
+use Test::More;
+use Test::Pod 1.41;
+
+all_pod_files_ok();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/xt/author/test-version.t 
new/HTTP-Tiny-0.058/xt/author/test-version.t
--- old/HTTP-Tiny-0.056/xt/author/test-version.t        1970-01-01 
01:00:00.000000000 +0100
+++ new/HTTP-Tiny-0.058/xt/author/test-version.t        2016-05-03 
17:30:06.000000000 +0200
@@ -0,0 +1,23 @@
+use strict;
+use warnings;
+use Test::More;
+
+# generated by Dist::Zilla::Plugin::Test::Version 1.07
+use Test::Version;
+
+my @imports = qw( version_all_ok );
+
+my $params = {
+    is_strict      => 0,
+    has_version    => 1,
+    multiple       => 0,
+
+};
+
+push @imports, $params
+    if version->parse( $Test::Version::VERSION ) >= version->parse('1.002');
+
+Test::Version->import(@imports);
+
+version_all_ok;
+done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/xt/release/pod-coverage.t 
new/HTTP-Tiny-0.058/xt/release/pod-coverage.t
--- old/HTTP-Tiny-0.056/xt/release/pod-coverage.t       2015-05-19 
12:00:48.000000000 +0200
+++ new/HTTP-Tiny-0.058/xt/release/pod-coverage.t       1970-01-01 
01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-#!perl
-# This file was automatically generated by 
Dist::Zilla::Plugin::PodCoverageTests.
-
-use Test::Pod::Coverage 1.08;
-use Pod::Coverage::TrustPod;
-
-all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/xt/release/pod-syntax.t 
new/HTTP-Tiny-0.058/xt/release/pod-syntax.t
--- old/HTTP-Tiny-0.056/xt/release/pod-syntax.t 2015-05-19 12:00:48.000000000 
+0200
+++ new/HTTP-Tiny-0.058/xt/release/pod-syntax.t 1970-01-01 01:00:00.000000000 
+0100
@@ -1,6 +0,0 @@
-#!perl
-# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
-use Test::More;
-use Test::Pod 1.41;
-
-all_pod_files_ok();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HTTP-Tiny-0.056/xt/release/test-version.t 
new/HTTP-Tiny-0.058/xt/release/test-version.t
--- old/HTTP-Tiny-0.056/xt/release/test-version.t       2015-05-19 
12:00:48.000000000 +0200
+++ new/HTTP-Tiny-0.058/xt/release/test-version.t       1970-01-01 
01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-use strict;
-use warnings;
-use Test::More;
-
-# generated by Dist::Zilla::Plugin::Test::Version 1.02
-use Test::Version;
-
-my @imports = qw( version_all_ok );
-
-my $params = {
-    is_strict      => 0,
-    has_version    => 1,
-
-};
-
-push @imports, $params
-    if version->parse( $Test::Version::VERSION ) >= version->parse('1.002');
-
-
-Test::Version->import(@imports);
-
-version_all_ok;
-done_testing;


Reply via email to