Commit a45123eb authored by Damyan Ivanov's avatar Damyan Ivanov

Imported Upstream version 0.056

parents d5f26da0 6c931a00
......@@ -5,35 +5,21 @@ 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).
release time, as is much of the documentation. Some generated files are
kept in the repository as a convenience (e.g. Makefile.PL or cpanfile).
Generally, **you do not need Dist::Zilla to contribute patches**. You do need
Dist::Zilla to create a tarball and/or install from the repository. See below
for guidance.
### Acceptable contributions
HTTP::Tiny is considered nearly feature-complete. The only features likely to
be added are those that improve compliance with RFC 2616. If you have ideas
for other features, please look at
[HTTP::Tiny::UA](http://p3rl.org/HTTP::Tiny::UA/) and consider adding your
feature there.
Bug fixes and performance improvements that do not bloat the code will be
considered for inclusion.
Dist::Zilla to create a tarball. See below for guidance.
### Getting dependencies
See the included `cpanfile` file for a list of dependencies. If you have
App::cpanminus 1.6 or later installed, you can use `cpanm` to satisfy
dependencies like this:
If you have App::cpanminus 1.6 or later installed, you can use `cpanm` to
satisfy dependencies like this:
$ cpanm --installdeps .
Otherwise, you can install Module::CPANfile 1.0002 or later and then satisfy
dependencies with the regular `cpan` client and `cpanfile-dump`:
$ cpan `cpanfile-dump`
Otherwise, look for either a `Makefile.PL` or `cpanfile` file for
a list of dependencies to satisfy.
### Running tests
......@@ -47,24 +33,24 @@ patches you have. I use `prove` for 99% of my testing during development.
### Code style and tidying
Please try to match any existing coding style.
Please try to match any existing coding style. If there is a `.perltidyrc`
file, please install Perl::Tidy and use perltidy before submitting patches.
If there is a `tidyall.ini` file, you can also install Code::TidyAll and run
`tidyall` on a file or `tidyall -a` to tidy all files.
### Patching documentation
Much of the documentation Pod is generated at release time.
Much of the documentation Pod is generated at release time. Some is
generated boilerplate; other documentation is built from pseudo-POD
directives in the source like C<=method> or C<=func>.
If you would like to submit a documentation edit, please limit yourself to the
documentation you see.
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.
### Installing from the repository
If you want to install directly from the repository, you need to have
Dist::Zilla installed (see below). If this is a burden to you, I welcome
patches against a CPAN tarball instead of the repository.
### Installing and using Dist::Zilla
Dist::Zilla is a very powerful authoring tool, optimized for maintaining a
......@@ -97,9 +83,5 @@ Once installed, here are some dzil commands you might try:
$ dzil test
$ dzil xtest
To install from the repository, use:
$ dzil install
You can learn more about Dist::Zilla at http://dzil.org/
Release notes for HTTP-Tiny
0.056 2015-05-19 06:00:40-04:00 America/New_York
- No changes from 0.055
0.055 2015-05-07 18:13:41-04:00 America/New_York (TRIAL RELEASE)
[ADDED]
- Added 'can_ssl' method to detect SSL support before trying and
failing with a fatal exception.
- Added support for 308 redirects
[FIXED]
- When specifying a custom CA file, if that file is missing or
unreadable, HTTP::Tiny will no longer fall back to a default CA
[DOCUMENTED]
- Noted units are bytes for max_size
0.054 2015-01-27 07:18:19-05:00 America/New_York
[ADDED]
- Added more fallback paths to find CA files (thanks golang)
[DOCUMENTED]
- Fixed a typo
0.053 2014-12-11 23:42:17-05:00 America/New_York
[FIXED]
- Defended tests against HTTP_PROXY set in the environment
0.052 2014-12-11 15:23:54-05:00 America/New_York
[CHANGED]
- Proxy allowed from environment variable HTTP_PROXY (uppercase) unless
REQUEST_METHOD is also set.
0.051 2014-11-17 22:58:44-05:00 America/New_York
[FIXED]
- Checks for threads without loading threads.pm
0.050 2014-09-23 15:30:18-04:00 America/New_York
[FIXED]
......
This software is copyright (c) 2014 by Christian Hansen.
This software is copyright (c) 2015 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 @@ b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
This software is Copyright (c) 2014 by Christian Hansen.
This software is Copyright (c) 2015 by Christian Hansen.
This is free software, licensed under:
......@@ -272,7 +272,7 @@ That's all there is to it!
--- The Artistic License 1.0 ---
This software is Copyright (c) 2014 by Christian Hansen.
This software is Copyright (c) 2015 by Christian Hansen.
This is free software, licensed under:
......
# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.020.
CONTRIBUTING
# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.036.
CONTRIBUTING.mkdn
Changes
LICENSE
MANIFEST
......@@ -7,6 +7,73 @@ META.json
META.yml
Makefile.PL
README
corpus/auth-01.txt
corpus/auth-02.txt
corpus/auth-03.txt
corpus/auth-04.txt
corpus/auth-05.txt
corpus/cookies-01.txt
corpus/cookies-02.txt
corpus/cookies-03.txt
corpus/cookies-04.txt
corpus/cookies-05.txt
corpus/cookies-06.txt
corpus/cookies-07.txt
corpus/delete-01.txt
corpus/form-01.txt
corpus/form-02.txt
corpus/form-03.txt
corpus/form-04.txt
corpus/form-05.txt
corpus/get-01.txt
corpus/get-02.txt
corpus/get-03.txt
corpus/get-04.txt
corpus/get-05.txt
corpus/get-06.txt
corpus/get-07.txt
corpus/get-08.txt
corpus/get-09.txt
corpus/get-10.txt
corpus/get-11.txt
corpus/get-12.txt
corpus/get-13.txt
corpus/get-14.txt
corpus/get-15.txt
corpus/get-16.txt
corpus/get-17.txt
corpus/get-18.txt
corpus/get-19.txt
corpus/get-20.txt
corpus/get-21.txt
corpus/head-01.txt
corpus/keepalive-01.txt
corpus/keepalive-02.txt
corpus/keepalive-03.txt
corpus/keepalive-04.txt
corpus/keepalive-05.txt
corpus/mirror-01.txt
corpus/mirror-02.txt
corpus/mirror-03.txt
corpus/mirror-04.txt
corpus/mirror-05.txt
corpus/post-01.txt
corpus/proxy-auth-01.txt
corpus/put-01.txt
corpus/put-02.txt
corpus/put-03.txt
corpus/put-04.txt
corpus/put-05.txt
corpus/redirect-01.txt
corpus/redirect-02.txt
corpus/redirect-03.txt
corpus/redirect-04.txt
corpus/redirect-05.txt
corpus/redirect-06.txt
corpus/redirect-07.txt
corpus/redirect-08.txt
corpus/redirect-09.txt
corpus/redirect-10.txt
cpanfile
dist.ini
eg/get.pl
......@@ -47,72 +114,6 @@ t/210_live_ssl.t
t/BrokenCookieJar.pm
t/SimpleCookieJar.pm
t/Util.pm
t/cases/auth-01.txt
t/cases/auth-02.txt
t/cases/auth-03.txt
t/cases/auth-04.txt
t/cases/auth-05.txt
t/cases/cookies-01.txt
t/cases/cookies-02.txt
t/cases/cookies-03.txt
t/cases/cookies-04.txt
t/cases/cookies-05.txt
t/cases/cookies-06.txt
t/cases/cookies-07.txt
t/cases/delete-01.txt
t/cases/form-01.txt
t/cases/form-02.txt
t/cases/form-03.txt
t/cases/form-04.txt
t/cases/form-05.txt
t/cases/get-01.txt
t/cases/get-02.txt
t/cases/get-03.txt
t/cases/get-04.txt
t/cases/get-05.txt
t/cases/get-06.txt
t/cases/get-07.txt
t/cases/get-08.txt
t/cases/get-09.txt
t/cases/get-10.txt
t/cases/get-11.txt
t/cases/get-12.txt
t/cases/get-13.txt
t/cases/get-14.txt
t/cases/get-15.txt
t/cases/get-16.txt
t/cases/get-17.txt
t/cases/get-18.txt
t/cases/get-19.txt
t/cases/get-20.txt
t/cases/get-21.txt
t/cases/head-01.txt
t/cases/keepalive-01.txt
t/cases/keepalive-02.txt
t/cases/keepalive-03.txt
t/cases/keepalive-04.txt
t/cases/keepalive-05.txt
t/cases/mirror-01.txt
t/cases/mirror-02.txt
t/cases/mirror-03.txt
t/cases/mirror-04.txt
t/cases/mirror-05.txt
t/cases/post-01.txt
t/cases/proxy-auth-01.txt
t/cases/put-01.txt
t/cases/put-02.txt
t/cases/put-03.txt
t/cases/put-04.txt
t/cases/put-05.txt
t/cases/redirect-01.txt
t/cases/redirect-02.txt
t/cases/redirect-03.txt
t/cases/redirect-04.txt
t/cases/redirect-05.txt
t/cases/redirect-06.txt
t/cases/redirect-07.txt
t/cases/redirect-08.txt
t/cases/redirect-09.txt
xt/author/00-compile.t
xt/author/critic.t
xt/author/pod-spell.t
......
......@@ -5,13 +5,13 @@
"David Golden <dagolden@cpan.org>"
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 5.020, CPAN::Meta::Converter version 2.140640",
"generated_by" : "Dist::Zilla version 5.036, CPAN::Meta::Converter version 2.150002",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : "2"
"version" : 2
},
"name" : "HTTP-Tiny",
"no_index" : {
......@@ -28,7 +28,8 @@
"prereqs" : {
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "6.17"
"ExtUtils::MakeMaker" : "6.17",
"perl" : "5.006"
}
},
"develop" : {
......@@ -36,17 +37,19 @@
"Dist::Zilla" : "5",
"Dist::Zilla::Plugin::Prereqs" : "0",
"Dist::Zilla::Plugin::RemovePrereqs" : "0",
"Dist::Zilla::PluginBundle::DAGOLDEN" : "0.068",
"Dist::Zilla::PluginBundle::DAGOLDEN" : "0.072",
"File::Spec" : "0",
"File::Temp" : "0",
"IO::Handle" : "0",
"IPC::Open3" : "0",
"Perl::Critic::Policy::Lax::ProhibitStringyEval::ExceptForRequire" : "0",
"Pod::Coverage::TrustPod" : "0",
"Test::CPAN::Meta" : "0",
"Test::More" : "0",
"Test::Pod" : "1.41",
"Test::Pod::Coverage" : "1.08",
"Test::Spelling" : "0.12"
"Test::Spelling" : "0.12",
"Test::Version" : "1"
}
},
"runtime" : {
......@@ -88,14 +91,15 @@
"IO::Socket::INET" : "0",
"IPC::Cmd" : "0",
"Test::More" : "0.96",
"open" : "0"
"open" : "0",
"perl" : "5.006"
}
}
},
"provides" : {
"HTTP::Tiny" : {
"file" : "lib/HTTP/Tiny.pm",
"version" : "0.050"
"version" : "0.056"
}
},
"release_status" : "stable",
......@@ -110,30 +114,31 @@
"web" : "https://github.com/chansen/p5-http-tiny"
}
},
"version" : "0.050",
"version" : "0.056",
"x_authority" : "cpan:DAGOLDEN",
"x_contributors" : [
"Alan Gardner <gardner@pythian.com>",
"Alessandro Ghedini <al3xbio@gmail.com>",
"Brad Gilbert <bgills@cpan.org>",
"Chris Nehren <apeiron@cpan.org>",
"Chris Weyl <rsrchboy@cpan.org>",
"Chris Weyl <cweyl@alumni.drew.edu>",
"Claes Jakobsson <claes@surfar.nu>",
"Clinton Gormley <clint@traveljury.com>",
"Craig Berry <cberry@cpan.org>",
"David Mitchell <davem@iabyn.com>",
"Dean Pearce <pearce@pythian.com>",
"Edward Zborowski <ed@rubensteintech.com>",
"James Raspass <jraspass@gmail.com>",
"Jeremy Mates <jmates@cpan.org>",
"Jess Robinson <castaway@desert-island.me.uk>",
"Lukas Eklund <leklund@gmail.com>",
"Martin J. Evans <mjegh@ntlworld.com>",
"Martin-Louis Bright <mlbright@gmail.com>",
"Mike Doherty <doherty@cpan.org>",
"Olaf Alders <olaf@wundersolutions.com>",
"Olivier Mengué <dolmen@cpan.org>",
"Petr Písař <ppisar@redhat.com>",
"Serguei Trouchelle <stro@cpan.org>",
"Syohei YOSHIDA <syohex@gmail.com>",
"Sören Kornetzki <soeren.kornetzki@delti.com>",
"Syohei YOSHIDA <syohex@gmail.com>",
"Tatsuhiko Miyagawa <miyagawa@bulknews.net>",
"Tom Hukins <tom@eborcom.com>",
"Tony Cook <tony@develop-help.com>"
]
......
......@@ -16,10 +16,12 @@ build_requires:
IPC::Cmd: '0'
Test::More: '0.96'
open: '0'
perl: '5.006'
configure_requires:
ExtUtils::MakeMaker: '6.17'
perl: '5.006'
dynamic_config: 0
generated_by: 'Dist::Zilla version 5.020, CPAN::Meta::Converter version 2.140640'
generated_by: 'Dist::Zilla version 5.036, CPAN::Meta::Converter version 2.150002'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
......@@ -36,7 +38,7 @@ no_index:
provides:
HTTP::Tiny:
file: lib/HTTP/Tiny.pm
version: '0.050'
version: '0.056'
recommends:
HTTP::CookieJar: '0.001'
IO::Socket::IP: '0.25'
......@@ -57,29 +59,30 @@ 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.050'
version: '0.056'
x_authority: cpan:DAGOLDEN
x_contributors:
- 'Alan Gardner <gardner@pythian.com>'
- 'Alessandro Ghedini <al3xbio@gmail.com>'
- 'Brad Gilbert <bgills@cpan.org>'
- 'Chris Nehren <apeiron@cpan.org>'
- 'Chris Weyl <rsrchboy@cpan.org>'
- 'Chris Weyl <cweyl@alumni.drew.edu>'
- 'Claes Jakobsson <claes@surfar.nu>'
- 'Clinton Gormley <clint@traveljury.com>'
- 'Craig Berry <cberry@cpan.org>'
- 'David Mitchell <davem@iabyn.com>'
- 'Dean Pearce <pearce@pythian.com>'
- 'Edward Zborowski <ed@rubensteintech.com>'
- 'James Raspass <jraspass@gmail.com>'
- 'Jeremy Mates <jmates@cpan.org>'
- 'Jess Robinson <castaway@desert-island.me.uk>'
- 'Lukas Eklund <leklund@gmail.com>'
- 'Martin J. Evans <mjegh@ntlworld.com>'
- 'Martin-Louis Bright <mlbright@gmail.com>'
- 'Mike Doherty <doherty@cpan.org>'
- 'Olaf Alders <olaf@wundersolutions.com>'
- 'Olivier Mengué <dolmen@cpan.org>'
- 'Petr Písař <ppisar@redhat.com>'
- 'Serguei Trouchelle <stro@cpan.org>'
- 'Syohei YOSHIDA <syohex@gmail.com>'
- 'Sören Kornetzki <soeren.kornetzki@delti.com>'
- 'Syohei YOSHIDA <syohex@gmail.com>'
- 'Tatsuhiko Miyagawa <miyagawa@bulknews.net>'
- 'Tom Hukins <tom@eborcom.com>'
- 'Tony Cook <tony@develop-help.com>'
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.020.
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.036.
use strict;
use warnings;
......@@ -7,8 +6,6 @@ use 5.006;
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>",
......@@ -18,6 +15,7 @@ my %WriteMakefileArgs = (
"DISTNAME" => "HTTP-Tiny",
"EXE_FILES" => [],
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.006",
"NAME" => "HTTP::Tiny",
"PREREQ_PM" => {
"Carp" => 0,
......@@ -43,7 +41,7 @@ my %WriteMakefileArgs = (
"Test::More" => "0.96",
"open" => 0
},
"VERSION" => "0.050",
"VERSION" => "0.056",
"test" => {
"TESTS" => "t/*.t"
}
......@@ -54,7 +52,7 @@ my %FallbackPrereqs = (
"Carp" => 0,
"Data::Dumper" => 0,
"Exporter" => 0,
"ExtUtils::MakeMaker" => 0,
"ExtUtils::MakeMaker" => "6.17",
"Fcntl" => 0,
"File::Basename" => 0,
"File::Spec" => 0,
......@@ -84,6 +82,3 @@ delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
WriteMakefile(%WriteMakefileArgs);
......@@ -2,7 +2,7 @@ NAME
HTTP::Tiny - A small, simple, correct HTTP/1.1 client
VERSION
version 0.050
version 0.056
SYNOPSIS
use HTTP::Tiny;
......@@ -58,9 +58,9 @@ METHODS
* "max_redirect" — Maximum number of redirects allowed (defaults to 5)
* "max_size" — Maximum response size (only when not using a data
callback). If defined, responses larger than this will return an
exception.
* "max_size" — Maximum response size in bytes (only when not using a
data callback). If defined, responses larger than this will return
an exception.
* "http_proxy" — URL of a proxy server to use for HTTP connections
(default is $ENV{http_proxy} — if set)
......@@ -250,14 +250,32 @@ METHODS
reference, the key/value pairs in the resulting string will be sorted by
key and value for consistent ordering.
can_ssl
$ok = HTTP::Tiny->can_ssl;
($ok, $why) = HTTP::Tiny->can_ssl;
($ok, $why) = $http->can_ssl;
Indicates if SSL support is available. When called as a class object, it
checks for the correct version of Net::SSLeay and IO::Socket::SSL. When
called as an object methods, if "SSL_verify" is true or if
"SSL_verify_mode" is set in "SSL_options", it checks that a CA file is
available.
In scalar context, returns a boolean indicating if SSL is available. In
list context, returns the boolean and a (possibly multi-line) string of
errors indicating why SSL isn't available.
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 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.
if the SSL encryption fails. You can also use "HTTP::Tiny::can_ssl()"
utility function that returns boolean to see if the required modules are
installed.
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.
SSL provides two distinct capabilities:
......@@ -326,12 +344,17 @@ PROXY SUPPORT
HTTP::Tiny supports the following proxy environment variables:
* http_proxy
* http_proxy or HTTP_PROXY
* https_proxy or HTTPS_PROXY
* all_proxy or ALL_PROXY
If the "REQUEST_METHOD" environment variable is set, then this might be
a CGI process and "HTTP_PROXY" would be set from the "Proxy:" header,
which is a security risk. If "REQUEST_METHOD" is set, "HTTP_PROXY" (the
upper case variant only) is ignored.
Tunnelling "https" over an "http" proxy using the CONNECT method is
supported. If your proxy uses "https" itself, you can not tunnel "https"
over it.
......@@ -377,10 +400,11 @@ LIMITATIONS
to ASCII. See URI::Escape, URI::_punycode and Net::IDN::Encode.
* Redirection is very strict against the specification. Redirection is
only automatic for response codes 301, 302 and 307 if the request
method is 'GET' or 'HEAD'. Response code 303 is always converted
into a 'GET' redirection, as mandated by the specification. There is
no automatic support for status 305 ("Use proxy") redirections.
only automatic for response codes 301, 302, 307 and 308 if the
request method is 'GET' or 'HEAD'. Response code 303 is always
converted into a 'GET' redirection, as mandated by the
specification. There is no automatic support for status 305 ("Use
proxy") redirections.
* There is no provision for delaying a request body using an "Expect"
header. Unexpected "1XX" responses are silently ignored as per the
......@@ -437,10 +461,26 @@ AUTHORS
CONTRIBUTORS
* Alan Gardner <gardner@pythian.com>
* Alessandro Ghedini <al3xbio@gmail.com>
* Brad Gilbert <bgills@cpan.org>
* Chris Nehren <apeiron@cpan.org>
* Chris Weyl <cweyl@alumni.drew.edu>
* Claes Jakobsson <claes@surfar.nu>
* Clinton Gormley <clint@traveljury.com>
* Dean Pearce <pearce@pythian.com>
* Edward Zborowski <ed@rubensteintech.com>
* James Raspass <jraspass@gmail.com>
* Jeremy Mates <jmates@cpan.org>
* Jess Robinson <castaway@desert-island.me.uk>
* Lukas Eklund <leklund@gmail.com>
......@@ -451,38 +491,24 @@ CONTRIBUTORS
* Mike Doherty <doherty@cpan.org>
* Olaf Alders <olaf@wundersolutions.com>
* Olivier Mengué <dolmen@cpan.org>
* Petr Písař <ppisar@redhat.com>
* Serguei Trouchelle <stro@cpan.org>
* Sören Kornetzki <soeren.kornetzki@delti.com>
* Syohei YOSHIDA <syohex@gmail.com>
* Alessandro Ghedini <al3xbio@gmail.com>
* Sören Kornetzki <soeren.kornetzki@delti.com>
* Tatsuhiko Miyagawa <miyagawa@bulknews.net>
* Tom Hukins <tom@eborcom.com>
* Tony Cook <tony@develop-help.com>
* Brad Gilbert <bgills@cpan.org>
* Chris Nehren <apeiron@cpan.org>
* Chris Weyl <rsrchboy@cpan.org>
* Claes Jakobsson <claes@surfar.nu>
* Clinton Gormley <clint@traveljury.com>
* Craig Berry <cberry@cpan.org>
* David Mitchell <davem@iabyn.com>
* Dean Pearce <pearce@pythian.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Christian Hansen.
This software is copyright (c) 2015 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.
......