[libhttp-tiny-perl] 01/04: Imported Upstream version 0.044

gregor herrmann gregoa at debian.org
Sat Jul 19 20:39:51 UTC 2014


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libhttp-tiny-perl.

commit ffc9e898e4e177593822fe32d28ab5c22dd66636
Author: gregor herrmann <gregoa at debian.org>
Date:   Sat Jul 19 22:09:50 2014 +0200

    Imported Upstream version 0.044
---
 Changes                |  13 ++
 LICENSE                |   2 +-
 MANIFEST               |   2 +-
 META.json              |  14 +-
 META.yml               |   9 +-
 Makefile.PL            |   5 +-
 README                 | 165 ++++++-------
 cpanfile               |   3 +-
 lib/HTTP/Tiny.pm       | 616 +++++++++++++++++++++++--------------------------
 t/00-report-prereqs.t  |   5 +-
 t/002_croakage.t       |   3 +
 t/140_proxy.t          |  14 ++
 xt/author/00-compile.t |   2 +-
 xt/author/pod-spell.t  |   7 +-
 14 files changed, 416 insertions(+), 444 deletions(-)

diff --git a/Changes b/Changes
index 471a3d4..bedf2c2 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,18 @@
 Release notes for HTTP-Tiny
 
+0.044     2014-07-16 23:46:09-04:00 America/New_York
+
+    [CHANGED]
+
+    - Providing a custom 'Host' header is now a fatal exception.  Previously, it
+      was silently ignored, as the RFC mandates that Host be set from the
+      URL, but ignoring it could lead to unexpected, confusing errors.
+
+    - optimized URL splitting
+
+    - Passing 'undef' for any proxy attribute will prevent HTTP::Tiny from
+      setting the proxy from the environment.
+
 0.043     2014-02-20 20:40:23-05:00 America/New_York
 
     [FIXED]
diff --git a/LICENSE b/LICENSE
index aa390a3..34445a6 100644
--- a/LICENSE
+++ b/LICENSE
@@ -22,7 +22,7 @@ This is free software, licensed under:
                      Version 1, February 1989
 
  Copyright (C) 1989 Free Software Foundation, Inc.
- 51 Franklin St, Suite 500, Boston, MA  02110-1335  USA
+ 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
diff --git a/MANIFEST b/MANIFEST
index 7af1abd..3921712 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.013.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.019.
 CONTRIBUTING
 Changes
 LICENSE
diff --git a/META.json b/META.json
index 2126cb1..550434f 100644
--- a/META.json
+++ b/META.json
@@ -5,7 +5,7 @@
       "David Golden <dagolden at cpan.org>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 5.013, CPAN::Meta::Converter version 2.133380",
+   "generated_by" : "Dist::Zilla version 5.019, CPAN::Meta::Converter version 2.141170",
    "license" : [
       "perl_5"
    ],
@@ -33,7 +33,7 @@
       },
       "develop" : {
          "requires" : {
-            "Dist::Zilla" : "5.013",
+            "Dist::Zilla" : "5",
             "Dist::Zilla::Plugin::Prereqs" : "0",
             "Dist::Zilla::Plugin::RemovePrereqs" : "0",
             "Dist::Zilla::PluginBundle::DAGOLDEN" : "0.060",
@@ -45,7 +45,8 @@
             "Test::CPAN::Meta" : "0",
             "Test::More" : "0",
             "Test::Pod" : "1.41",
-            "Test::Pod::Coverage" : "1.08"
+            "Test::Pod::Coverage" : "1.08",
+            "Test::Spelling" : "0.12"
          }
       },
       "runtime" : {
@@ -98,7 +99,7 @@
    "provides" : {
       "HTTP::Tiny" : {
          "file" : "lib/HTTP/Tiny.pm",
-         "version" : "0.043"
+         "version" : "0.044"
       }
    },
    "release_status" : "stable",
@@ -113,19 +114,20 @@
          "web" : "https://github.com/chansen/p5-http-tiny"
       }
    },
-   "version" : "0.043",
+   "version" : "0.044",
    "x_authority" : "cpan:DAGOLDEN",
    "x_contributors" : [
       "Alan Gardner <gardner at pythian.com>",
       "Alessandro Ghedini <al3xbio at gmail.com>",
       "Brad Gilbert <bgills at cpan.org>",
       "Chris Nehren <apeiron at cpan.org>",
-      "Chris Weyl <cweyl at alumni.drew.edu>",
+      "Chris Weyl <rsrchboy at cpan.org>",
       "Claes Jakobsson <claes at surfar.nu>",
       "Clinton Gormley <clint at traveljury.com>",
       "Craig Berry <cberry at cpan.org>",
       "David Mitchell <davem at iabyn.com>",
       "Edward Zborowski <ed at rubensteintech.com>",
+      "James Raspass <jraspass at gmail.com>",
       "Jess Robinson <castaway at desert-island.me.uk>",
       "Lukas Eklund <leklund at gmail.com>",
       "Martin J. Evans <mjegh at ntlworld.com>",
diff --git a/META.yml b/META.yml
index 1c1c58f..26fb738 100644
--- a/META.yml
+++ b/META.yml
@@ -22,7 +22,7 @@ build_requires:
 configure_requires:
   ExtUtils::MakeMaker: '6.17'
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 5.013, CPAN::Meta::Converter version 2.133380'
+generated_by: 'Dist::Zilla version 5.019, CPAN::Meta::Converter version 2.141170'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -39,7 +39,7 @@ no_index:
 provides:
   HTTP::Tiny:
     file: lib/HTTP/Tiny.pm
-    version: '0.043'
+    version: '0.044'
 recommends:
   HTTP::CookieJar: '0.001'
   IO::Socket::IP: '0.25'
@@ -60,19 +60,20 @@ resources:
   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.043'
+version: '0.044'
 x_authority: cpan:DAGOLDEN
 x_contributors:
   - 'Alan Gardner <gardner at pythian.com>'
   - 'Alessandro Ghedini <al3xbio at gmail.com>'
   - 'Brad Gilbert <bgills at cpan.org>'
   - 'Chris Nehren <apeiron at cpan.org>'
-  - 'Chris Weyl <cweyl at alumni.drew.edu>'
+  - 'Chris Weyl <rsrchboy at cpan.org>'
   - 'Claes Jakobsson <claes at surfar.nu>'
   - 'Clinton Gormley <clint at traveljury.com>'
   - 'Craig Berry <cberry at cpan.org>'
   - 'David Mitchell <davem at iabyn.com>'
   - 'Edward Zborowski <ed at rubensteintech.com>'
+  - 'James Raspass <jraspass at gmail.com>'
   - 'Jess Robinson <castaway at desert-island.me.uk>'
   - 'Lukas Eklund <leklund at gmail.com>'
   - 'Martin J. Evans <mjegh at ntlworld.com>'
diff --git a/Makefile.PL b/Makefile.PL
index 7db7c97..c1e4569 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,5 +1,5 @@
 
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.013.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.019.
 use strict;
 use warnings;
 
@@ -12,7 +12,6 @@ use ExtUtils::MakeMaker 6.17;
 my %WriteMakefileArgs = (
   "ABSTRACT" => "A small, simple, correct HTTP/1.1 client",
   "AUTHOR" => "Christian Hansen <chansen\@cpan.org>, David Golden <dagolden\@cpan.org>",
-  "BUILD_REQUIRES" => {},
   "CONFIGURE_REQUIRES" => {
     "ExtUtils::MakeMaker" => "6.17"
   },
@@ -47,7 +46,7 @@ my %WriteMakefileArgs = (
     "open" => 0,
     "version" => 0
   },
-  "VERSION" => "0.043",
+  "VERSION" => "0.044",
   "test" => {
     "TESTS" => "t/*.t"
   }
diff --git a/README b/README
index d81dbf4..629b94c 100644
--- a/README
+++ b/README
@@ -2,7 +2,7 @@ NAME
     HTTP::Tiny - A small, simple, correct HTTP/1.1 client
 
 VERSION
-    version 0.043
+    version 0.044
 
 SYNOPSIS
         use HTTP::Tiny;
@@ -41,72 +41,50 @@ METHODS
     This constructor returns a new HTTP::Tiny object. Valid attributes
     include:
 
-    *   "agent"
+    *   "agent" — A user-agent string (defaults to 'HTTP-Tiny/$VERSION'). If
+        "agent" — ends in a space character, the default user-agent string
+        is appended.
 
-        A user-agent string (defaults to 'HTTP-Tiny/$VERSION'). If "agent"
-        ends in a space character, the default user-agent string is
-        appended.
+    *   "cookie_jar" — An instance of HTTP::CookieJar — or equivalent class
+        that supports the "add" and "cookie_header" methods
 
-    *   "cookie_jar"
+    *   "default_headers" — A hashref of default headers to apply to
+        requests
 
-        An instance of HTTP::CookieJar or equivalent class that supports the
-        "add" and "cookie_header" methods
+    *   "local_address" — The local IP address to bind to
 
-    *   "default_headers"
+    *   "keep_alive" — Whether to reuse the last connection (if for the same
+        scheme, host and port) (defaults to 1)
 
-        A hashref of default headers to apply to requests
+    *   "max_redirect" — Maximum number of redirects allowed (defaults to 5)
 
-    *   "local_address"
+    *   "max_size" — Maximum response size (only when not using a data
+        callback). If defined, responses larger than this will return an
+        exception.
 
-        The local IP address to bind to
+    *   "http_proxy" — URL of a proxy server to use for HTTP connections
+        (default is $ENV{http_proxy} — if set)
 
-    *   "keep_alive"
+    *   "https_proxy" — URL of a proxy server to use for HTTPS connections
+        (default is $ENV{https_proxy} — if set)
 
-        Whether to reuse the last connection (if for the same scheme, host
-        and port) (defaults to 1)
+    *   "proxy" — URL of a generic proxy server for both HTTP and HTTPS
+        connections (default is $ENV{all_proxy} — if set)
 
-    *   "max_redirect"
+    *   "no_proxy" — List of domain suffixes that should not be proxied.
+        Must be a comma-separated string or an array reference. (default is
+        $ENV{no_proxy} —)
 
-        Maximum number of redirects allowed (defaults to 5)
+    *   "timeout" — Request timeout in seconds (default is 60)
 
-    *   "max_size"
+    *   "verify_SSL" — A boolean that indicates whether to validate the SSL
+        certificate of an "https" — connection (default is false)
 
-        Maximum response size (only when not using a data callback). If
-        defined, responses larger than this will return an exception.
+    *   "SSL_options" — A hashref of "SSL_*" — options to pass through to
+        IO::Socket::SSL
 
-    *   "http_proxy"
-
-        URL of a proxy server to use for HTTP connections (default is
-        $ENV{http_proxy} if set)
-
-    *   "https_proxy"
-
-        URL of a proxy server to use for HTTPS connections (default is
-        $ENV{https_proxy} if set)
-
-    *   "proxy"
-
-        URL of a generic proxy server for both HTTP and HTTPS connections
-        (default is $ENV{all_proxy} if set)
-
-    *   "no_proxy"
-
-        List of domain suffixes that should not be proxied. Must be a
-        comma-separated string or an array reference. (default is
-        $ENV{no_proxy})
-
-    *   "timeout"
-
-        Request timeout in seconds (default is 60)
-
-    *   "verify_SSL"
-
-        A boolean that indicates whether to validate the SSL certificate of
-        an "https" connection (default is false)
-
-    *   "SSL_options"
-
-        A hashref of "SSL_*" options to pass through to IO::Socket::SSL
+    Passing an explicit "undef" for "proxy", "http_proxy" or "https_proxy"
+    will prevent getting the corresponding proxies from the environment.
 
     Exceptions from "max_size", "timeout" or other errors will result in a
     pseudo-HTTP status code of 599 and a reason of "Internal Exception". The
@@ -197,28 +175,26 @@ METHODS
 
     Valid options are:
 
-    *   "headers"
-
-        A hashref containing headers to include with the request. If the
-        value for a header is an array reference, the header will be output
-        multiple times with each value in the array. These headers
-        over-write any default headers.
-
-    *   "content"
+    *   "headers" — A hashref containing headers to include with the
+        request. If the value for a header is an array reference, the header
+        will be output multiple times with each value in the array. These
+        headers over-write any default headers.
 
-        A scalar to include as the body of the request OR a code reference
-        that will be called iteratively to produce the body of the request
+    *   "content" — A scalar to include as the body of the request OR a code
+        reference that will be called iteratively to produce the body of the
+        request
 
-    *   "trailer_callback"
+    *   "trailer_callback" — A code reference that will be called if it
+        exists to provide a hashref of trailing headers (only used with
+        chunked transfer-encoding)
 
-        A code reference that will be called if it exists to provide a
-        hashref of trailing headers (only used with chunked
-        transfer-encoding)
+    *   "data_callback" — A code reference that will be called for each
+        chunks of the response body received.
 
-    *   "data_callback"
-
-        A code reference that will be called for each chunks of the response
-        body received.
+    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
+    compliance.
 
     If the "content" option is a code reference, it will be called
     iteratively to provide the content body of the request. It should return
@@ -237,36 +213,25 @@ METHODS
     The "request" method returns a hashref containing the response. The
     hashref will have the following keys:
 
-    *   "success"
-
-        Boolean indicating whether the operation returned a 2XX status code
-
-    *   "url"
+    *   "success" — Boolean indicating whether the operation returned a 2XX
+        status code
 
-        URL that provided the response. This is the URL of the request
-        unless there were redirections, in which case it is the last URL
-        queried in a redirection chain
+    *   "url" — URL that provided the response. This is the URL of the
+        request unless there were redirections, in which case it is the last
+        URL queried in a redirection chain
 
-    *   "status"
+    *   "status" — The HTTP status code of the response
 
-        The HTTP status code of the response
+    *   "reason" — The response phrase returned by the server
 
-    *   "reason"
+    *   "content" — The body of the response. If the response does not have
+        any content or if a data callback is provided to consume the
+        response body, this will be the empty string
 
-        The response phrase returned by the server
-
-    *   "content"
-
-        The body of the response. If the response does not have any content
-        or if a data callback is provided to consume the response body, this
-        will be the empty string
-
-    *   "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
+    *   "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
 
     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
@@ -287,8 +252,8 @@ METHODS
 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
-    be thrown if a new enough versions of these modules not installed or if
-    the SSL encryption fails. An "https" connection may be made via an
+    be thrown if new enough versions of these modules are not installed or
+    if the SSL encryption fails. An "https" connection may be made via an
     "http" proxy that supports the CONNECT command (i.e. RFC 2817). You may
     not proxy "https" via a proxy that itself requires "https" to
     communicate.
@@ -462,7 +427,7 @@ CONTRIBUTORS
 
     *   Chris Nehren <apeiron at cpan.org>
 
-    *   Chris Weyl <cweyl at alumni.drew.edu>
+    *   Chris Weyl <rsrchboy at cpan.org>
 
     *   Claes Jakobsson <claes at surfar.nu>
 
@@ -474,6 +439,8 @@ CONTRIBUTORS
 
     *   Edward Zborowski <ed at rubensteintech.com>
 
+    *   James Raspass <jraspass at gmail.com>
+
     *   Jess Robinson <castaway at desert-island.me.uk>
 
     *   Lukas Eklund <leklund at gmail.com>
diff --git a/cpanfile b/cpanfile
index 2f4e175..4ab2d11 100644
--- a/cpanfile
+++ b/cpanfile
@@ -42,7 +42,7 @@ on 'configure' => sub {
 };
 
 on 'develop' => sub {
-  requires "Dist::Zilla" => "5.013";
+  requires "Dist::Zilla" => "5";
   requires "Dist::Zilla::Plugin::Prereqs" => "0";
   requires "Dist::Zilla::Plugin::RemovePrereqs" => "0";
   requires "Dist::Zilla::PluginBundle::DAGOLDEN" => "0.060";
@@ -55,4 +55,5 @@ on 'develop' => sub {
   requires "Test::More" => "0";
   requires "Test::Pod" => "1.41";
   requires "Test::Pod::Coverage" => "1.08";
+  requires "Test::Spelling" => "0.12";
 };
diff --git a/lib/HTTP/Tiny.pm b/lib/HTTP/Tiny.pm
index e348753..82bb151 100644
--- a/lib/HTTP/Tiny.pm
+++ b/lib/HTTP/Tiny.pm
@@ -3,60 +3,63 @@ package HTTP::Tiny;
 use strict;
 use warnings;
 # ABSTRACT: A small, simple, correct HTTP/1.1 client
-our $VERSION = '0.043'; # VERSION
+our $VERSION = '0.044'; # VERSION
 
 use Carp ();
 
-# =method new
-#
-#     $http = HTTP::Tiny->new( %attributes );
-#
-# This constructor returns a new HTTP::Tiny object.  Valid attributes include:
-#
-# =for :list
-# * C<agent>
-# A user-agent string (defaults to 'HTTP-Tiny/$VERSION'). If C<agent> ends in a space character, the default user-agent string is appended.
-# * C<cookie_jar>
-# An instance of L<HTTP::CookieJar> or equivalent class that supports the C<add> and C<cookie_header> methods
-# * C<default_headers>
-# A hashref of default headers to apply to requests
-# * C<local_address>
-# The local IP address to bind to
-# * C<keep_alive>
-# Whether to reuse the last connection (if for the same scheme, host and port) (defaults to 1)
-# * C<max_redirect>
-# Maximum number of redirects allowed (defaults to 5)
-# * C<max_size>
-# Maximum response size (only when not using a data callback).  If defined, responses larger than this will return an exception.
-# * C<http_proxy>
-# URL of a proxy server to use for HTTP connections (default is C<$ENV{http_proxy}> if set)
-# * C<https_proxy>
-# URL of a proxy server to use for HTTPS connections (default is C<$ENV{https_proxy}> if set)
-# * C<proxy>
-# URL of a generic proxy server for both HTTP and HTTPS connections (default is C<$ENV{all_proxy}> if set)
-# * C<no_proxy>
-# 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}>)
-# * C<timeout>
-# Request timeout in seconds (default is 60)
-# * C<verify_SSL>
-# A boolean that indicates whether to validate the SSL certificate of an C<https>
-# connection (default is false)
-# * C<SSL_options>
-# A hashref of C<SSL_*> options to pass through to L<IO::Socket::SSL>
-#
-# Exceptions from C<max_size>, C<timeout> or other errors will result in a
-# pseudo-HTTP status code of 599 and a reason of "Internal Exception". The
-# content field in the response will contain the text of the exception.
-#
-# The C<keep_alive> parameter enables a persistent connection, but only to a
-# single destination scheme, host and port.  Also, if any connection-relevant
-# attributes are modified, a persistent connection will be dropped.  If you want
-# persistent connections across multiple destinations, use multiple HTTP::Tiny
-# objects.
-#
-# See L</SSL SUPPORT> for more on the C<verify_SSL> and C<SSL_options> attributes.
-#
-# =cut
+#pod =method new
+#pod
+#pod     $http = HTTP::Tiny->new( %attributes );
+#pod
+#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 (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
+#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.
+#pod
+#pod Exceptions from C<max_size>, C<timeout> or other errors will result in a
+#pod pseudo-HTTP status code of 599 and a reason of "Internal Exception". The
+#pod content field in the response will contain the text of the exception.
+#pod
+#pod The C<keep_alive> parameter enables a persistent connection, but only to a
+#pod single destination scheme, host and port.  Also, if any connection-relevant
+#pod attributes are modified, a persistent connection will be dropped.  If you want
+#pod persistent connections across multiple destinations, use multiple HTTP::Tiny
+#pod objects.
+#pod
+#pod See L</SSL SUPPORT> for more on the C<verify_SSL> and C<SSL_options> attributes.
+#pod
+#pod =cut
 
 my @attributes;
 BEGIN {
@@ -120,36 +123,45 @@ sub new {
 sub _set_proxies {
     my ($self) = @_;
 
-    if (! $self->{proxy} ) {
+    # get proxies from %ENV only if not provided; explicit undef will disable
+    # getting proxies from the environment
+
+    # generic proxy
+    if (! exists $self->{proxy} ) {
         $self->{proxy} = $ENV{all_proxy} || $ENV{ALL_PROXY};
-        if ( defined $self->{proxy} ) {
-            $self->_split_proxy( 'generic proxy' => $self->{proxy} ); # validate
-        }
-        else {
-            delete $self->{proxy};
-        }
     }
 
-    if (! $self->{http_proxy} ) {
+    if ( defined $self->{proxy} ) {
+        $self->_split_proxy( 'generic proxy' => $self->{proxy} ); # validate
+    }
+    else {
+        delete $self->{proxy};
+    }
+
+    # http proxy
+    if (! exists $self->{http_proxy} ) {
         $self->{http_proxy} = $ENV{http_proxy} || $self->{proxy};
-        if ( defined $self->{http_proxy} ) {
-            $self->_split_proxy( http_proxy => $self->{http_proxy} ); # validate
-            $self->{_has_proxy}{http} = 1;
-        }
-        else {
-            delete $self->{http_proxy};
-        }
     }
 
-    if (! $self->{https_proxy} ) {
+    if ( defined $self->{http_proxy} ) {
+        $self->_split_proxy( http_proxy => $self->{http_proxy} ); # validate
+        $self->{_has_proxy}{http} = 1;
+    }
+    else {
+        delete $self->{http_proxy};
+    }
+
+    # https proxy
+    if (! exists $self->{https_proxy} ) {
         $self->{https_proxy} = $ENV{https_proxy} || $ENV{HTTPS_PROXY} || $self->{proxy};
-        if ( $self->{https_proxy} ) {
-            $self->_split_proxy( https_proxy => $self->{https_proxy} ); # validate
-            $self->{_has_proxy}{https} = 1;
-        }
-        else {
-            delete $self->{https_proxy};
-        }
+    }
+
+    if ( $self->{https_proxy} ) {
+        $self->_split_proxy( https_proxy => $self->{https_proxy} ); # validate
+        $self->{_has_proxy}{https} = 1;
+    }
+    else {
+        delete $self->{https_proxy};
     }
 
     # Split no_proxy to array reference if not provided as such
@@ -161,19 +173,19 @@ sub _set_proxies {
     return;
 }
 
-# =method get|head|put|post|delete
-#
-#     $response = $http->get($url);
-#     $response = $http->get($url, \%options);
-#     $response = $http->head($url);
-#
-# These methods are shorthand for calling C<request()> for the given method.  The
-# URL must have unsafe characters escaped and international domain names encoded.
-# See C<request()> for valid options and a description of the response.
-#
-# The C<success> field of the response will be true if the status code is 2XX.
-#
-# =cut
+#pod =method get|head|put|post|delete
+#pod
+#pod     $response = $http->get($url);
+#pod     $response = $http->get($url, \%options);
+#pod     $response = $http->head($url);
+#pod
+#pod These methods are shorthand for calling C<request()> for the given method.  The
+#pod URL must have unsafe characters escaped and international domain names encoded.
+#pod See C<request()> for valid options and a description of the response.
+#pod
+#pod The C<success> field of the response will be true if the status code is 2XX.
+#pod
+#pod =cut
 
 for my $sub_name ( qw/get head put post delete/ ) {
     my $req_method = uc $sub_name;
@@ -188,25 +200,25 @@ for my $sub_name ( qw/get head put post delete/ ) {
 HERE
 }
 
-# =method post_form
-#
-#     $response = $http->post_form($url, $form_data);
-#     $response = $http->post_form($url, $form_data, \%options);
-#
-# This method executes a C<POST> request and sends the key/value pairs from a
-# form data hash or array reference to the given URL with a C<content-type> of
-# C<application/x-www-form-urlencoded>.  If data is provided as an array
-# reference, the order is preserved; if provided as a hash reference, the terms
-# are sorted on key and value for consistency.  See documentation for the
-# C<www_form_urlencode> method for details on the encoding.
-#
-# The URL must have unsafe characters escaped and international domain names
-# encoded.  See C<request()> for valid options and a description of the response.
-# Any C<content-type> header or content in the options hashref will be ignored.
-#
-# The C<success> field of the response will be true if the status code is 2XX.
-#
-# =cut
+#pod =method post_form
+#pod
+#pod     $response = $http->post_form($url, $form_data);
+#pod     $response = $http->post_form($url, $form_data, \%options);
+#pod
+#pod This method executes a C<POST> request and sends the key/value pairs from a
+#pod form data hash or array reference to the given URL with a C<content-type> of
+#pod C<application/x-www-form-urlencoded>.  If data is provided as an array
+#pod reference, the order is preserved; if provided as a hash reference, the terms
+#pod are sorted on key and value for consistency.  See documentation for the
+#pod C<www_form_urlencode> method for details on the encoding.
+#pod
+#pod The URL must have unsafe characters escaped and international domain names
+#pod encoded.  See C<request()> for valid options and a description of the response.
+#pod Any C<content-type> header or content in the options hashref will be ignored.
+#pod
+#pod The C<success> field of the response will be true if the status code is 2XX.
+#pod
+#pod =cut
 
 sub post_form {
     my ($self, $url, $data, $args) = @_;
@@ -230,28 +242,28 @@ sub post_form {
     );
 }
 
-# =method mirror
-#
-#     $response = $http->mirror($url, $file, \%options)
-#     if ( $response->{success} ) {
-#         print "$file is up to date\n";
-#     }
-#
-# Executes a C<GET> request for the URL and saves the response body to the file
-# name provided.  The URL must have unsafe characters escaped and international
-# domain names encoded.  If the file already exists, the request will include an
-# C<If-Modified-Since> header with the modification timestamp of the file.  You
-# may specify a different C<If-Modified-Since> header yourself in the C<<
-# $options->{headers} >> hash.
-#
-# The C<success> field of the response will be true if the status code is 2XX
-# or if the status code is 304 (unmodified).
-#
-# If the file was modified and the server response includes a properly
-# formatted C<Last-Modified> header, the file modification time will
-# be updated accordingly.
-#
-# =cut
+#pod =method mirror
+#pod
+#pod     $response = $http->mirror($url, $file, \%options)
+#pod     if ( $response->{success} ) {
+#pod         print "$file is up to date\n";
+#pod     }
+#pod
+#pod Executes a C<GET> request for the URL and saves the response body to the file
+#pod name provided.  The URL must have unsafe characters escaped and international
+#pod domain names encoded.  If the file already exists, the request will include an
+#pod C<If-Modified-Since> header with the modification timestamp of the file.  You
+#pod may specify a different C<If-Modified-Since> header yourself in the C<<
+#pod $options->{headers} >> hash.
+#pod
+#pod The C<success> field of the response will be true if the status code is 2XX
+#pod or if the status code is 304 (unmodified).
+#pod
+#pod If the file was modified and the server response includes a properly
+#pod formatted C<Last-Modified> header, the file modification time will
+#pod be updated accordingly.
+#pod
+#pod =cut
 
 sub mirror {
     my ($self, $url, $file, $args) = @_;
@@ -284,86 +296,90 @@ sub mirror {
     return $response;
 }
 
-# =method request
-#
-#     $response = $http->request($method, $url);
-#     $response = $http->request($method, $url, \%options);
-#
-# Executes an HTTP request of the given method type ('GET', 'HEAD', 'POST',
-# 'PUT', etc.) on the given URL.  The URL must have unsafe characters escaped and
-# international domain names encoded.
-#
-# If the URL includes a "user:password" stanza, they will be used for Basic-style
-# authorization headers.  (Authorization headers will not be included in a
-# redirected request.) For example:
-#
-#     $http->request('GET', 'http://Aladdin:open sesame at example.com/');
-#
-# If the "user:password" stanza contains reserved characters, they must
-# be percent-escaped:
-#
-#     $http->request('GET', 'http://john%40example.com:password@example.com/');
-#
-# A hashref of options may be appended to modify the request.
-#
-# Valid options are:
-#
-# =for :list
-# * C<headers>
-# A hashref containing headers to include with the request.  If the value for
-# a header is an array reference, the header will be output multiple times with
-# each value in the array.  These headers over-write any default headers.
-# * C<content>
-# A scalar to include as the body of the request OR a code reference
-# that will be called iteratively to produce the body of the request
-# * C<trailer_callback>
-# A code reference that will be called if it exists to provide a hashref
-# of trailing headers (only used with chunked transfer-encoding)
-# * C<data_callback>
-# A code reference that will be called for each chunks of the response
-# body received.
-#
-# If the C<content> option is a code reference, it will be called iteratively
-# to provide the content body of the request.  It should return the empty
-# string or undef when the iterator is exhausted.
-#
-# If the C<content> option is the empty string, no C<content-type> or
-# C<content-length> headers will be generated.
-#
-# If the C<data_callback> option is provided, it will be called iteratively until
-# the entire response body is received.  The first argument will be a string
-# containing a chunk of the response body, the second argument will be the
-# in-progress response hash reference, as described below.  (This allows
-# customizing the action of the callback based on the C<status> or C<headers>
-# received prior to the content body.)
-#
-# The C<request> method returns a hashref containing the response.  The hashref
-# will have the following keys:
-#
-# =for :list
-# * C<success>
-# Boolean indicating whether the operation returned a 2XX status code
-# * C<url>
-# URL that provided the response. This is the URL of the request unless
-# there were redirections, in which case it is the last URL queried
-# in a redirection chain
-# * C<status>
-# The HTTP status code of the response
-# * C<reason>
-# The response phrase returned by the server
-# * C<content>
-# The body of the response.  If the response does not have any content
-# or if a data callback is provided to consume the response body,
-# this will be the empty string
-# * 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
-#
-# On an exception during the execution of the request, the C<status> field will
-# contain 599, and the C<content> field will contain the text of the exception.
-#
-# =cut
+#pod =method request
+#pod
+#pod     $response = $http->request($method, $url);
+#pod     $response = $http->request($method, $url, \%options);
+#pod
+#pod Executes an HTTP request of the given method type ('GET', 'HEAD', 'POST',
+#pod 'PUT', etc.) on the given URL.  The URL must have unsafe characters escaped and
+#pod international domain names encoded.
+#pod
+#pod If the URL includes a "user:password" stanza, they will be used for Basic-style
+#pod authorization headers.  (Authorization headers will not be included in a
+#pod redirected request.) For example:
+#pod
+#pod     $http->request('GET', 'http://Aladdin:open sesame at example.com/');
+#pod
+#pod If the "user:password" stanza contains reserved characters, they must
+#pod be percent-escaped:
+#pod
+#pod     $http->request('GET', 'http://john%40example.com:password@example.com/');
+#pod
+#pod A hashref of options may be appended to modify the request.
+#pod
+#pod Valid options are:
+#pod
+#pod =for :list
+#pod * C<headers> —
+#pod     A hashref containing headers to include with the request.  If the value for
+#pod     a header is an array reference, the header will be output multiple times with
+#pod     each value in the array.  These headers over-write any default headers.
+#pod * C<content> —
+#pod     A scalar to include as the body of the request OR a code reference
+#pod     that will be called iteratively to produce the body of the request
+#pod * C<trailer_callback> —
+#pod     A code reference that will be called if it exists to provide a hashref
+#pod     of trailing headers (only used with chunked transfer-encoding)
+#pod * C<data_callback> —
+#pod     A code reference that will be called for each chunks of the response
+#pod     body received.
+#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
+#pod may be ignored or overwritten if necessary for transport compliance.
+#pod
+#pod If the C<content> option is a code reference, it will be called iteratively
+#pod to provide the content body of the request.  It should return the empty
+#pod string or undef when the iterator is exhausted.
+#pod
+#pod If the C<content> option is the empty string, no C<content-type> or
+#pod C<content-length> headers will be generated.
+#pod
+#pod If the C<data_callback> option is provided, it will be called iteratively until
+#pod the entire response body is received.  The first argument will be a string
+#pod containing a chunk of the response body, the second argument will be the
+#pod in-progress response hash reference, as described below.  (This allows
+#pod customizing the action of the callback based on the C<status> or C<headers>
+#pod received prior to the content body.)
+#pod
+#pod The C<request> method returns a hashref containing the response.  The hashref
+#pod will have the following keys:
+#pod
+#pod =for :list
+#pod * C<success> —
+#pod     Boolean indicating whether the operation returned a 2XX status code
+#pod * C<url> —
+#pod     URL that provided the response. This is the URL of the request unless
+#pod     there were redirections, in which case it is the last URL queried
+#pod     in a redirection chain
+#pod * C<status> —
+#pod     The HTTP status code of the response
+#pod * C<reason> —
+#pod     The response phrase returned by the server
+#pod * C<content> —
+#pod     The body of the response.  If the response does not have any content
+#pod     or if a data callback is provided to consume the response body,
+#pod     this will be the empty string
+#pod * C<headers> —
+#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
+#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.
+#pod
+#pod =cut
 
 my %idempotent = map { $_ => 1 } qw/GET HEAD PUT DELETE OPTIONS TRACE/;
 
@@ -404,19 +420,19 @@ sub request {
     return $response;
 }
 
-# =method www_form_urlencode
-#
-#     $params = $http->www_form_urlencode( $data );
-#     $response = $http->get("http://example.com/query?$params");
-#
-# This method converts the key/value pairs from a data hash or array reference
-# into a C<x-www-form-urlencoded> string.  The keys and values from the data
-# reference will be UTF-8 encoded and escaped per RFC 3986.  If a value is an
-# array reference, the key will be repeated with each of the values of the array
-# reference.  If data is provided as a hash reference, the key/value pairs in the
-# resulting string will be sorted by key and value for consistent ordering.
-#
-# =cut
+#pod =method www_form_urlencode
+#pod
+#pod     $params = $http->www_form_urlencode( $data );
+#pod     $response = $http->get("http://example.com/query?$params");
+#pod
+#pod This method converts the key/value pairs from a data hash or array reference
+#pod into a C<x-www-form-urlencoded> string.  The keys and values from the data
+#pod reference will be UTF-8 encoded and escaped per RFC 3986.  If a value is an
+#pod array reference, the key will be repeated with each of the values of the array
+#pod reference.  If data is provided as a hash reference, the key/value pairs in the
+#pod resulting string will be sorted by key and value for consistent ordering.
+#pod
+#pod =cut
 
 sub www_form_urlencode {
     my ($self, $data) = @_;
@@ -641,6 +657,11 @@ sub _prepare_headers_and_cb {
             $request->{headers}{lc $k} = $v;
         }
     }
+
+    if (exists $request->{headers}{'host'}) {
+        die(qq/The 'Host' header must not be provided as header option\n/);
+    }
+
     $request->{headers}{'host'}         = $request->{host_port};
     $request->{headers}{'user-agent'} ||= $self->{agent};
     $request->{headers}{'connection'}   = "close"
@@ -757,31 +778,27 @@ sub _split_url {
     my $url = pop;
 
     # URI regex adapted from the URI module
-    my ($scheme, $authority, $path_query) = $url =~ m<\A([^:/?#]+)://([^/?#]*)([^#]*)>
+    my ($scheme, $host, $path_query) = $url =~ m<\A([^:/?#]+)://([^/?#]*)([^#]*)>
       or die(qq/Cannot parse URL: '$url'\n/);
 
     $scheme     = lc $scheme;
     $path_query = "/$path_query" unless $path_query =~ m<\A/>;
 
-    my ($auth,$host);
-    $authority = (length($authority)) ? $authority : 'localhost';
-    if ( $authority =~ /@/ ) {
-        ($auth,$host) = $authority =~ m/\A([^@]*)@(.*)\z/;   # user:pass at host
+    my $auth = '';
+    if ( (my $i = index $host, '@') != -1 ) {
+        # user:pass at host
+        $auth = substr $host, 0, $i, ''; # take up to the @ for auth
+        substr $host, 0, 1, '';          # knock the @ off the host
+
         # userinfo might be percent escaped, so recover real auth info
         $auth =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
     }
-    else {
-        $host = $authority;
-        $auth = '';
-    }
-    $host = lc $host;
-    my $port = do {
-       $host =~ s/:([0-9]*)\z// && length $1
-         ? $1
-         : ($scheme eq 'http' ? 80 : $scheme eq 'https' ? 443 : undef);
-    };
+    my $port = $host =~ s/:(\d*)\z// && length $1 ? $1
+             : $scheme eq 'http'                  ? 80
+             : $scheme eq 'https'                 ? 443
+             : undef;
 
-    return ($scheme, $host, $port, $path_query, $auth);
+    return ($scheme, (length $host ? lc $host : "localhost") , $port, $path_query, $auth);
 }
 
 # Date conversions adapted from HTTP::Date
@@ -1428,7 +1445,7 @@ HTTP::Tiny - A small, simple, correct HTTP/1.1 client
 
 =head1 VERSION
 
-version 0.043
+version 0.044
 
 =head1 SYNOPSIS
 
@@ -1473,91 +1490,65 @@ This constructor returns a new HTTP::Tiny object.  Valid attributes include:
 
 =item *
 
-C<agent>
-
-A user-agent string (defaults to 'HTTP-Tiny/$VERSION'). If C<agent> ends in a space character, the default user-agent string is appended.
+C<agent> — A user-agent string (defaults to 'HTTP-Tiny/$VERSION'). If C<agent> — ends in a space character, the default user-agent string is appended.
 
 =item *
 
-C<cookie_jar>
-
-An instance of L<HTTP::CookieJar> or equivalent class that supports the C<add> and C<cookie_header> methods
+C<cookie_jar> — An instance of L<HTTP::CookieJar> — or equivalent class that supports the C<add> and C<cookie_header> methods
 
 =item *
 
-C<default_headers>
-
-A hashref of default headers to apply to requests
+C<default_headers> — A hashref of default headers to apply to requests
 
 =item *
 
-C<local_address>
-
-The local IP address to bind to
+C<local_address> — The local IP address to bind to
 
 =item *
 
-C<keep_alive>
-
-Whether to reuse the last connection (if for the same scheme, host and port) (defaults to 1)
+C<keep_alive> — Whether to reuse the last connection (if for the same scheme, host and port) (defaults to 1)
 
 =item *
 
-C<max_redirect>
-
-Maximum number of redirects allowed (defaults to 5)
+C<max_redirect> — Maximum number of redirects allowed (defaults to 5)
 
 =item *
 
-C<max_size>
-
-Maximum response size (only when not using a data callback).  If defined, responses larger than this will return an exception.
+C<max_size> — Maximum response size (only when not using a data callback).  If defined, responses larger than this will return an exception.
 
 =item *
 
-C<http_proxy>
-
-URL of a proxy server to use for HTTP connections (default is C<$ENV{http_proxy}> if set)
+C<http_proxy> — URL of a proxy server to use for HTTP connections (default is C<$ENV{http_proxy}> — if set)
 
 =item *
 
-C<https_proxy>
-
-URL of a proxy server to use for HTTPS connections (default is C<$ENV{https_proxy}> if set)
+C<https_proxy> — URL of a proxy server to use for HTTPS connections (default is C<$ENV{https_proxy}> — if set)
 
 =item *
 
-C<proxy>
-
-URL of a generic proxy server for both HTTP and HTTPS connections (default is C<$ENV{all_proxy}> if set)
+C<proxy> — URL of a generic proxy server for both HTTP and HTTPS connections (default is C<$ENV{all_proxy}> — if set)
 
 =item *
 
-C<no_proxy>
-
-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}>)
+C<no_proxy> — 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}> —)
 
 =item *
 
-C<timeout>
-
-Request timeout in seconds (default is 60)
+C<timeout> — Request timeout in seconds (default is 60)
 
 =item *
 
-C<verify_SSL>
-
-A boolean that indicates whether to validate the SSL certificate of an C<https>
-connection (default is false)
+C<verify_SSL> — A boolean that indicates whether to validate the SSL certificate of an C<https> — connection (default is false)
 
 =item *
 
-C<SSL_options>
-
-A hashref of C<SSL_*> options to pass through to L<IO::Socket::SSL>
+C<SSL_options> — A hashref of C<SSL_*> — options to pass through to L<IO::Socket::SSL>
 
 =back
 
+Passing an explicit C<undef> for C<proxy>, C<http_proxy> or C<https_proxy> will
+prevent getting the corresponding proxies from the environment.
+
 Exceptions from C<max_size>, C<timeout> or other errors will result in a
 pseudo-HTTP status code of 599 and a reason of "Internal Exception". The
 content field in the response will contain the text of the exception.
@@ -1649,35 +1640,26 @@ Valid options are:
 
 =item *
 
-C<headers>
-
-A hashref containing headers to include with the request.  If the value for
-a header is an array reference, the header will be output multiple times with
-each value in the array.  These headers over-write any default headers.
+C<headers> — A hashref containing headers to include with the request.  If the value for a header is an array reference, the header will be output multiple times with each value in the array.  These headers over-write any default headers.
 
 =item *
 
-C<content>
-
-A scalar to include as the body of the request OR a code reference
-that will be called iteratively to produce the body of the request
+C<content> — A scalar to include as the body of the request OR a code reference that will be called iteratively to produce the body of the request
 
 =item *
 
-C<trailer_callback>
-
-A code reference that will be called if it exists to provide a hashref
-of trailing headers (only used with chunked transfer-encoding)
+C<trailer_callback> — A code reference that will be called if it exists to provide a hashref of trailing headers (only used with chunked transfer-encoding)
 
 =item *
 
-C<data_callback>
-
-A code reference that will be called for each chunks of the response
-body received.
+C<data_callback> — A code reference that will be called for each chunks of the response body received.
 
 =back
 
+The C<Host> header is generated from the URL in accordance with RFC 2616.  It
+is a fatal error to specify C<Host> in the C<headers> option.  Other headers
+may be ignored or overwritten if necessary for transport compliance.
+
 If the C<content> option is a code reference, it will be called iteratively
 to provide the content body of the request.  It should return the empty
 string or undef when the iterator is exhausted.
@@ -1699,45 +1681,27 @@ will have the following keys:
 
 =item *
 
-C<success>
-
-Boolean indicating whether the operation returned a 2XX status code
+C<success> — Boolean indicating whether the operation returned a 2XX status code
 
 =item *
 
-C<url>
-
-URL that provided the response. This is the URL of the request unless
-there were redirections, in which case it is the last URL queried
-in a redirection chain
+C<url> — URL that provided the response. This is the URL of the request unless there were redirections, in which case it is the last URL queried in a redirection chain
 
 =item *
 
-C<status>
-
-The HTTP status code of the response
+C<status> — The HTTP status code of the response
 
 =item *
 
-C<reason>
-
-The response phrase returned by the server
+C<reason> — The response phrase returned by the server
 
 =item *
 
-C<content>
-
-The body of the response.  If the response does not have any content
-or if a data callback is provided to consume the response body,
-this will be the empty string
+C<content> — The body of the response.  If the response does not have any content or if a data callback is provided to consume the response body, this will be the empty string
 
 =item *
 
-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
+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
 
 =back
 
@@ -1775,7 +1739,7 @@ verify_SSL
 
 Direct C<https> connections are supported only if L<IO::Socket::SSL> 1.56 or
 greater and L<Net::SSLeay> 1.49 or greater are installed. An exception will be
-thrown if a new enough versions of these modules not installed or if the SSL
+thrown if new enough versions of these modules are not installed or if the SSL
 encryption fails. An C<https> connection may be made via an C<http> proxy that
 supports the CONNECT command (i.e. RFC 2817).  You may not proxy C<https> via
 a proxy that itself requires C<https> to communicate.
@@ -2035,7 +1999,7 @@ Chris Nehren <apeiron at cpan.org>
 
 =item *
 
-Chris Weyl <cweyl at alumni.drew.edu>
+Chris Weyl <rsrchboy at cpan.org>
 
 =item *
 
@@ -2059,6 +2023,10 @@ Edward Zborowski <ed at rubensteintech.com>
 
 =item *
 
+James Raspass <jraspass at gmail.com>
+
+=item *
+
 Jess Robinson <castaway at desert-island.me.uk>
 
 =item *
diff --git a/t/00-report-prereqs.t b/t/00-report-prereqs.t
index 4af99aa..a0adb6f 100644
--- a/t/00-report-prereqs.t
+++ b/t/00-report-prereqs.t
@@ -50,7 +50,7 @@ my $static_prereqs = do { my $x = {
                       },
        'develop' => {
                       'requires' => {
-                                      'Dist::Zilla' => '5.013',
+                                      'Dist::Zilla' => '5',
                                       'Dist::Zilla::Plugin::Prereqs' => '0',
                                       'Dist::Zilla::Plugin::RemovePrereqs' => '0',
                                       'Dist::Zilla::PluginBundle::DAGOLDEN' => '0.060',
@@ -62,7 +62,8 @@ my $static_prereqs = do { my $x = {
                                       'Test::CPAN::Meta' => '0',
                                       'Test::More' => '0',
                                       'Test::Pod' => '1.41',
-                                      'Test::Pod::Coverage' => '1.08'
+                                      'Test::Pod::Coverage' => '1.08',
+                                      'Test::Spelling' => '0.12'
                                     }
                     },
        'runtime' => {
diff --git a/t/002_croakage.t b/t/002_croakage.t
index a243ebc..690f67e 100644
--- a/t/002_croakage.t
+++ b/t/002_croakage.t
@@ -35,5 +35,8 @@ for my $c ( @cases ) {
   like ($err, qr/\Q$usage{$method}\E/, join("|",@$c) );
 }
 
+my $res =  $http->get("http://www.example.com/", { headers => { host => "www.example2.com" } } );
+like( $res->{content}, qr/'Host' header/, "Providing a Host header is fatal" );
+
 done_testing;
 
diff --git a/t/140_proxy.t b/t/140_proxy.t
index 401f8ae..6ecc6a5 100644
--- a/t/140_proxy.t
+++ b/t/140_proxy.t
@@ -31,5 +31,19 @@ for my $proxy ("http://localhost:8080/", "http://localhost:8080"){
     like($@, qr{http_proxy URL must be in format http\[s\]://\[auth\@\]<host>:<port>/});
 }
 
+# Explicitly disable proxy
+{
+    local $ENV{all_proxy} = "http://localhost:8080";
+    local $ENV{http_proxy} = "http://localhost:8080";
+    local $ENV{https_proxy} = "http://localhost:8080";
+    my $c = HTTP::Tiny->new(
+        proxy => undef,
+        http_proxy => undef,
+        https_proxy => undef,
+    );
+    ok(!defined $c->proxy, "proxy => undef disables ENV proxy");
+    ok(!defined $c->http_proxy, "http_proxy => undef disables ENV proxy");
+    ok(!defined $c->https_proxy, "https_proxy => undef disables ENV proxy");
+}
 
 done_testing();
diff --git a/xt/author/00-compile.t b/xt/author/00-compile.t
index 71cb91f..6890ede 100644
--- a/xt/author/00-compile.t
+++ b/xt/author/00-compile.t
@@ -2,7 +2,7 @@ use 5.006;
 use strict;
 use warnings;
 
-# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.039
+# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.043
 
 use Test::More  tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
 
diff --git a/xt/author/pod-spell.t b/xt/author/pod-spell.t
index 6c6c734..cab3f0b 100644
--- a/xt/author/pod-spell.t
+++ b/xt/author/pod-spell.t
@@ -2,7 +2,7 @@ use strict;
 use warnings;
 use Test::More;
 
-# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006002
+# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006008
 use Test::Spelling 0.12;
 use Pod::Wordlist;
 
@@ -32,7 +32,7 @@ Chris
 Nehren
 apeiron
 Weyl
-cweyl
+rsrchboy
 Claes
 Jakobsson
 claes
@@ -47,6 +47,9 @@ davem
 Edward
 Zborowski
 ed
+James
+Raspass
+jraspass
 Jess
 Robinson
 castaway

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libhttp-tiny-perl.git



More information about the Pkg-perl-cvs-commits mailing list