Commit 4a7bd5af authored by Chris Butler's avatar Chris Butler

[svn-upgrade] new version libhttp-tiny-perl (0.013)

parent af655e5d
Release notes for HTTP-Tiny
0.013 2011-07-17 23:14:22 America/New_York
[NEW FEATURES]
- $ENV{http_proxy} support added [Claes Jakobsson]
[OTHER]
- Internal/private errors converted from "croak" to "die" as internal
errors are caught by "eval"
0.012 2011-03-31 15:48:02 America/New_York
[BUG FIXES]
......
......@@ -18,15 +18,16 @@ This is free software, licensed under:
The GNU General Public License, Version 1, February 1989
GNU GENERAL PUBLIC LICENSE
Version 1, February 1989
GNU GENERAL PUBLIC LICENSE
Version 1, February 1989
Copyright (C) 1989 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307, 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.
Preamble
Preamble
The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public
......@@ -67,7 +68,7 @@ authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any program or other work which
......@@ -185,7 +186,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
NO WARRANTY
9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
......@@ -207,9 +208,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
......@@ -235,8 +236,9 @@ the exclusion of warranty; and each file should have at least the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
......
......@@ -5,6 +5,7 @@ META.json
META.yml
Makefile.PL
README
README.PATCHING
dist.ini
eg/get.pl
eg/mirror.pl
......@@ -24,6 +25,7 @@ t/100_get.t
t/110_mirror.t
t/120_put.t
t/130_redirect.t
t/140_proxy.t
t/200_live.t
t/Util.pm
t/cases/get-01.txt
......
......@@ -5,7 +5,7 @@
"David Golden <dagolden@cpan.org>"
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 4.200004, CPAN::Meta::Converter version 2.110580",
"generated_by" : "Dist::Zilla version 4.200009, CPAN::Meta::Converter version 2.110930",
"license" : [
"perl_5"
],
......@@ -28,7 +28,7 @@
"prereqs" : {
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "6.31"
"ExtUtils::MakeMaker" : "6.30"
}
},
"runtime" : {
......@@ -57,11 +57,11 @@
"provides" : {
"HTTP::Tiny" : {
"file" : "lib/HTTP/Tiny.pm",
"version" : "0.012"
"version" : "0.013"
},
"HTTP::Tiny::Handle" : {
"file" : "lib/HTTP/Tiny.pm",
"version" : "0.012"
"version" : "0.013"
}
},
"release_status" : "stable",
......@@ -70,13 +70,13 @@
"mailto" : "bug-http-tiny at rt.cpan.org",
"web" : "http://rt.cpan.org/Public/Dist/Display.html?Name=HTTP-Tiny"
},
"homepage" : "http://github.com/dagolden/p5-http-tiny/tree",
"homepage" : "http://github.com/dagolden/p5-http-tiny",
"repository" : {
"type" : "git",
"url" : "git://github.com/dagolden/p5-http-tiny.git",
"web" : "http://github.com/dagolden/p5-http-tiny/tree"
"url" : "http://github.com/dagolden/p5-http-tiny",
"web" : "http://github.com/dagolden/p5-http-tiny"
}
},
"version" : "0.012"
"version" : "0.013"
}
......@@ -15,9 +15,9 @@ build_requires:
IO::Socket::INET: 0
Test::More: 0.88
configure_requires:
ExtUtils::MakeMaker: 6.31
ExtUtils::MakeMaker: 6.30
dynamic_config: 0
generated_by: 'Dist::Zilla version 4.200004, CPAN::Meta::Converter version 2.110580'
generated_by: 'Dist::Zilla version 4.200009, CPAN::Meta::Converter version 2.110930'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
......@@ -34,10 +34,10 @@ no_index:
provides:
HTTP::Tiny:
file: lib/HTTP/Tiny.pm
version: 0.012
version: 0.013
HTTP::Tiny::Handle:
file: lib/HTTP/Tiny.pm
version: 0.012
version: 0.013
requires:
Carp: 0
IO::Socket: 0
......@@ -45,6 +45,6 @@ requires:
perl: 5.006
resources:
bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=HTTP-Tiny
homepage: http://github.com/dagolden/p5-http-tiny/tree
repository: git://github.com/dagolden/p5-http-tiny.git
version: 0.012
homepage: http://github.com/dagolden/p5-http-tiny
repository: http://github.com/dagolden/p5-http-tiny
version: 0.013
......@@ -2,9 +2,9 @@
use strict;
use warnings;
BEGIN { require 5.006; }
use 5.006;
use ExtUtils::MakeMaker 6.31;
use ExtUtils::MakeMaker 6.30;
......@@ -24,7 +24,7 @@ my %WriteMakefileArgs = (
'Test::More' => '0.88'
},
'CONFIGURE_REQUIRES' => {
'ExtUtils::MakeMaker' => '6.31'
'ExtUtils::MakeMaker' => '6.30'
},
'DISTNAME' => 'HTTP-Tiny',
'EXE_FILES' => [],
......@@ -35,7 +35,7 @@ my %WriteMakefileArgs = (
'IO::Socket' => '0',
'Time::Local' => '0'
},
'VERSION' => '0.012',
'VERSION' => '0.013',
'test' => {
'TESTS' => 't/*.t'
}
......
......@@ -2,7 +2,7 @@ NAME
HTTP::Tiny - A small, simple, correct HTTP/1.1 client
VERSION
version 0.012
version 0.013
SYNOPSIS
use HTTP::Tiny;
......@@ -56,7 +56,7 @@ METHODS
* proxy
URL of a proxy server to use.
URL of a proxy server to use (default is $ENV{http_proxy} if set)
* timeout
......@@ -202,7 +202,10 @@ LIMITATIONS
should also set "max_redirect" to zero to ensure cookies are not
inappropriately re-transmitted.
* Proxy environment variables are not supported.
* Only the "http_proxy" environment variable is supported in the
format "http://HOST:PORT/". If a "proxy" argument is passed to "new"
(including undef), then the "http_proxy" environment variable is
ignored.
* There is no provision for delaying a request body using an "Expect"
header. Unexpected "1XX" responses are silently ignored as per the
......@@ -227,9 +230,9 @@ SUPPORT
This is open source software. The code repository is available for
public review and contribution under the terms of the license.
<http://github.com/dagolden/p5-http-tiny/tree>
<http://github.com/dagolden/p5-http-tiny>
git clone git://github.com/dagolden/p5-http-tiny.git
git clone http://github.com/dagolden/p5-http-tiny
AUTHORS
* Christian Hansen <chansen@cpan.org>
......
README.PATCHING
Thank you for considering contributing to this distribution. This file
contains instructions that will help you work with the source code.
The distribution is managed with Dist::Zilla. This means than many of the
usual files you might expect are not in the repository, but are generated
at release time (e.g. Makefile.PL).
However, you can run tests directly using the 'prove' tool:
$ prove -l
$ prove -lv t/some_test_file.t
For most distributions, 'prove' is entirely sufficent for you to test any
patches you have.
Likewise, much of the documentation Pod is generated at release time.
Depending on the distribution, some documentation may be written in a Pod
dialect called WikiDoc. (See Pod::WikiDoc on CPAN.) If you would like to
submit a documentation edit, please limit yourself to the documentation you
see.
If you see typos or documentation issues in the generated docs, please
email or open a bug ticket instead of patching.
Dist::Zilla is a very powerful authoring tool, but requires a number of
author-specific plugins. If you would like to use it for contributing,
install it from CPAN, then run one of the following commands, depending on
your CPAN client:
$ cpan `dzil authordeps`
$ dzil authordeps | cpanm
Once installed, here are some dzil commands you might try:
$ dzil build
$ dzil test
$ dzil xtest
You can learn more about Dist::Zilla at http://dzil.org/
......@@ -5,7 +5,6 @@ license = Perl_5
copyright_holder = Christian Hansen
[@DAGOLDEN]
git_remote = github
[RemovePrereqs]
remove = Errno
......
#!/usr/bin/perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......
#!/usr/bin/perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......
#!/usr/bin/perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......
This diff is collapsed.
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......@@ -32,7 +24,18 @@ find(
'lib',
);
my @scripts = glob "bin/*";
my @scripts;
if ( -d 'bin' ) {
find(
sub {
return unless -f;
my $found = $File::Find::name;
# nothing to skip
push @scripts, $found;
},
'bin',
);
}
my $plan = scalar(@modules) + scalar(@scripts);
$plan ? (plan tests => $plan) : (plan skip_all => "no tests to run");
......
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......
#!perl
use strict;
use warnings;
use File::Basename;
use Test::More 0.88;
use HTTP::Tiny;
# Require a true value
for my $proxy (undef, "", 0){
local $ENV{http_proxy} = $proxy;
my $c = HTTP::Tiny->new();
ok(!defined $c->proxy);
}
# trailing / is optional
for my $proxy ("http://localhost:8080/", "http://localhost:8080"){
local $ENV{http_proxy} = $proxy;
my $c = HTTP::Tiny->new();
is($c->proxy, $proxy);
}
# http_proxy must be http://<host>:<port> format
{
local $ENV{http_proxy} = "localhost:8080";
eval {
my $c = HTTP::Tiny->new();
};
like($@, qr{Environment 'http_proxy' must be in format http://<host>:<port>/});
}
done_testing();
\ No newline at end of file
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use strict;
use warnings;
......
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
package t::Util;
use strict;
......@@ -172,6 +164,8 @@ sub sort_headers {
$self->{fh} = shift @res_fh;
};
*HTTP::Tiny::Handle::close = sub { 1 }; # don't close our temps
delete $ENV{http_proxy}; # don't try to proxy in mock-mode
}
}
......
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use Test::More;
......
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use Test::More;
......
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use Test::More;
eval "use Test::Pod 1.41";
......
#!perl
#
# This file is part of HTTP-Tiny
#
# This software is copyright (c) 2011 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.
#
use Test::More;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment