diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-06-17 19:01:52 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-06-17 19:01:52 -0500 |
commit | 44347bc37dcf08013d40fa6b2119f494376b722c (patch) | |
tree | ab4fcb3f8e83f3f0764248193eddae6f4b9c1b42 /cpan/HTTP-Tiny | |
parent | 7d69032bd017d8bdbad34e17891c12a94721ec21 (diff) | |
download | perl-44347bc37dcf08013d40fa6b2119f494376b722c.tar.gz |
bump HTTP::Tiny to CPAN version 0.022
Diffstat (limited to 'cpan/HTTP-Tiny')
-rw-r--r-- | cpan/HTTP-Tiny/lib/HTTP/Tiny.pm | 27 | ||||
-rw-r--r-- | cpan/HTTP-Tiny/t/001_api.t | 2 |
2 files changed, 21 insertions, 8 deletions
diff --git a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm index d69435e122..01f4e92e99 100644 --- a/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm +++ b/cpan/HTTP-Tiny/lib/HTTP/Tiny.pm @@ -3,14 +3,14 @@ package HTTP::Tiny; use strict; use warnings; # ABSTRACT: A small, simple, correct HTTP/1.1 client -our $VERSION = '0.021'; # VERSION +our $VERSION = '0.022'; # VERSION use Carp (); my @attributes; BEGIN { - @attributes = qw(agent default_headers max_redirect max_size proxy timeout SSL_options verify_SSL); + @attributes = qw(agent default_headers local_address max_redirect max_size proxy timeout SSL_options verify_SSL); no strict 'refs'; for my $accessor ( @attributes ) { *{$accessor} = sub { @@ -193,9 +193,10 @@ sub _request { }; my $handle = HTTP::Tiny::Handle->new( - timeout => $self->{timeout}, - SSL_options => $self->{SSL_options}, - verify_SSL => $self->{verify_SSL}, + timeout => $self->{timeout}, + SSL_options => $self->{SSL_options}, + verify_SSL => $self->{verify_SSL}, + local_address => $self->{local_address}, ); if ($self->{proxy}) { @@ -426,10 +427,11 @@ sub connect { elsif ( $scheme ne 'http' ) { die(qq/Unsupported URL scheme '$scheme'\n/); } - $self->{fh} = 'IO::Socket::INET'->new( PeerHost => $host, PeerPort => $port, + $self->{local_address} ? + ( LocalAddr => $self->{local_address} ) : (), Proto => 'tcp', Type => SOCK_STREAM, Timeout => $self->{timeout} @@ -887,7 +889,7 @@ HTTP::Tiny - A small, simple, correct HTTP/1.1 client =head1 VERSION -version 0.021 +version 0.022 =head1 SYNOPSIS @@ -940,6 +942,12 @@ A hashref of default headers to apply to requests =item * +C<local_address> + +The local IP address to bind to + +=item * + C<max_redirect> Maximum number of redirects allowed (defaults to 5) @@ -1155,6 +1163,7 @@ and value. =for Pod::Coverage agent default_headers +local_address max_redirect max_size proxy @@ -1305,6 +1314,10 @@ Only 'chunked' C<Transfer-Encoding> is supported. There is no support for a Request-URI of '*' for the 'OPTIONS' request. +=item * + +There is no support for IPv6 of any kind. + =back =head1 SEE ALSO diff --git a/cpan/HTTP-Tiny/t/001_api.t b/cpan/HTTP-Tiny/t/001_api.t index 94b20a5659..4311c67a55 100644 --- a/cpan/HTTP-Tiny/t/001_api.t +++ b/cpan/HTTP-Tiny/t/001_api.t @@ -7,7 +7,7 @@ use Test::More tests => 2; use HTTP::Tiny; my @accessors = qw( - agent default_headers max_redirect max_size proxy timeout SSL_options verify_SSL + agent default_headers local_address max_redirect max_size proxy timeout SSL_options verify_SSL ); my @methods = qw( new get head put post delete post_form request mirror www_form_urlencode |