Merge tag 'upstream/0.22'
Upstream version 0.22
# gpg: Signature made Thu 21 Jul 2016 12:54:04 PM BRT using RSA key ID 9883C97C
# gpg: Good signature from "Lucas Kanashiro <kanashiro@debian.org>"
# gpg: aka "Lucas Kanashiro <kanashiro.duarte@gmail.com>"
Lucas Kanashiro
7 years ago
|
0 |
0.22 2016-07-19 08:03:23 PDT
|
|
1 |
- Do not set HTTP_PROXY (kazeburo) #14
|
|
2 |
|
0 | 3 |
0.21 2015-07-21 09:02:04 PDT
|
1 | 4 |
- Fix to restore the selected filehandle correctly #12
|
2 | 5 |
|
0 | |
# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.037.
|
|
0 |
# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.006.
|
1 | 1 |
Changes
|
2 | 2 |
LICENSE
|
3 | 3 |
MANIFEST
|
|
15 | 15 |
t/03_socket.t
|
16 | 16 |
t/04_utf8.t
|
17 | 17 |
t/05_lint.t
|
18 | |
t/release-pod-syntax.t
|
|
18 |
t/06_httproxy.t
|
|
19 |
t/author-pod-syntax.t
|
3 | 3 |
"Tokuhiro Matsuno <tokuhirom@cpan.org>"
|
4 | 4 |
],
|
5 | 5 |
"dynamic_config" : 0,
|
6 | |
"generated_by" : "Dist::Zilla version 5.037, Dist::Milla version v1.0.15, CPAN::Meta::Converter version 2.150005",
|
|
6 |
"generated_by" : "Dist::Milla version v1.0.16, Dist::Zilla version 6.006, CPAN::Meta::Converter version 2.150005",
|
7 | 7 |
"license" : [
|
8 | 8 |
"perl_5"
|
9 | 9 |
],
|
|
14 | 14 |
"name" : "CGI-Emulate-PSGI",
|
15 | 15 |
"no_index" : {
|
16 | 16 |
"directory" : [
|
17 | |
"t",
|
18 | |
"xt",
|
|
17 |
"eg",
|
|
18 |
"examples",
|
19 | 19 |
"inc",
|
20 | 20 |
"share",
|
21 | |
"eg",
|
22 | |
"examples"
|
|
21 |
"t",
|
|
22 |
"xt"
|
23 | 23 |
]
|
24 | 24 |
},
|
25 | 25 |
"prereqs" : {
|
|
30 | 30 |
},
|
31 | 31 |
"develop" : {
|
32 | 32 |
"requires" : {
|
33 | |
"Dist::Milla" : "v1.0.15",
|
|
33 |
"Dist::Milla" : "v1.0.16",
|
34 | 34 |
"Test::Pod" : "1.41"
|
35 | 35 |
}
|
36 | 36 |
},
|
|
60 | 60 |
"web" : "https://github.com/tokuhirom/p5-cgi-emulate-psgi"
|
61 | 61 |
}
|
62 | 62 |
},
|
63 | |
"version" : "0.21",
|
|
63 |
"version" : "0.22",
|
64 | 64 |
"x_contributors" : [
|
65 | 65 |
"Bastian Blank <waldi@debian.org>",
|
66 | 66 |
"Clay Fouts <cfouts@liblime.com>",
|
|
69 | 69 |
"James Wright <james2vegas@aim.com>",
|
70 | 70 |
"Kazuho Oku <kazuhooku@gmail.com>",
|
71 | 71 |
"Mark Stosberg <mark@stosberg.com>",
|
|
72 |
"Masahiro Nagano <kazeburo@gmail.com>",
|
72 | 73 |
"Tatsuhiko Miyagawa <miyagawa@bulknews.net>",
|
73 | 74 |
"Tokuhiro Matsuno <tokuhirom@gmail.com>"
|
74 | |
]
|
|
75 |
],
|
|
76 |
"x_serialization_backend" : "Cpanel::JSON::XS version 3.0217"
|
75 | 77 |
}
|
76 | 78 |
|
7 | 7 |
configure_requires:
|
8 | 8 |
ExtUtils::MakeMaker: '0'
|
9 | 9 |
dynamic_config: 0
|
10 | |
generated_by: 'Dist::Zilla version 5.037, Dist::Milla version v1.0.15, CPAN::Meta::Converter version 2.150005'
|
|
10 |
generated_by: 'Dist::Milla version v1.0.16, Dist::Zilla version 6.006, CPAN::Meta::Converter version 2.150005'
|
11 | 11 |
license: perl
|
12 | 12 |
meta-spec:
|
13 | 13 |
url: http://module-build.sourceforge.net/META-spec-v1.4.html
|
|
15 | 15 |
name: CGI-Emulate-PSGI
|
16 | 16 |
no_index:
|
17 | 17 |
directory:
|
|
18 |
- eg
|
|
19 |
- examples
|
|
20 |
- inc
|
|
21 |
- share
|
18 | 22 |
- t
|
19 | 23 |
- xt
|
20 | |
- inc
|
21 | |
- share
|
22 | |
- eg
|
23 | |
- examples
|
24 | 24 |
requires:
|
25 | 25 |
CGI: '3.63'
|
26 | 26 |
HTTP::Response: '0'
|
|
29 | 29 |
bugtracker: https://github.com/tokuhirom/p5-cgi-emulate-psgi/issues
|
30 | 30 |
homepage: https://github.com/tokuhirom/p5-cgi-emulate-psgi
|
31 | 31 |
repository: https://github.com/tokuhirom/p5-cgi-emulate-psgi.git
|
32 | |
version: '0.21'
|
|
32 |
version: '0.22'
|
33 | 33 |
x_contributors:
|
34 | 34 |
- 'Bastian Blank <waldi@debian.org>'
|
35 | 35 |
- 'Clay Fouts <cfouts@liblime.com>'
|
|
38 | 38 |
- 'James Wright <james2vegas@aim.com>'
|
39 | 39 |
- 'Kazuho Oku <kazuhooku@gmail.com>'
|
40 | 40 |
- 'Mark Stosberg <mark@stosberg.com>'
|
|
41 |
- 'Masahiro Nagano <kazeburo@gmail.com>'
|
41 | 42 |
- 'Tatsuhiko Miyagawa <miyagawa@bulknews.net>'
|
42 | 43 |
- 'Tokuhiro Matsuno <tokuhirom@gmail.com>'
|
|
44 |
x_serialization_backend: 'YAML::Tiny version 1.69'
|
0 | |
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.037.
|
|
0 |
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.006.
|
1 | 1 |
use strict;
|
2 | 2 |
use warnings;
|
3 | 3 |
|
|
12 | 12 |
"ExtUtils::MakeMaker" => 0
|
13 | 13 |
},
|
14 | 14 |
"DISTNAME" => "CGI-Emulate-PSGI",
|
15 | |
"EXE_FILES" => [],
|
16 | 15 |
"LICENSE" => "perl",
|
17 | 16 |
"MIN_PERL_VERSION" => "5.008001",
|
18 | 17 |
"NAME" => "CGI::Emulate::PSGI",
|
|
24 | 23 |
"Test::More" => "0.88",
|
25 | 24 |
"Test::Requires" => "0.08"
|
26 | 25 |
},
|
27 | |
"VERSION" => "0.21",
|
|
26 |
"VERSION" => "0.22",
|
28 | 27 |
"test" => {
|
29 | 28 |
"TESTS" => "t/*.t"
|
30 | 29 |
}
|
|
33 | 32 |
|
34 | 33 |
my %FallbackPrereqs = (
|
35 | 34 |
"CGI" => "3.63",
|
36 | |
"ExtUtils::MakeMaker" => 0,
|
37 | 35 |
"HTTP::Response" => 0,
|
38 | 36 |
"Test::More" => "0.88",
|
39 | 37 |
"Test::Requires" => "0.08"
|
7 | 7 |
use Carp qw(croak);
|
8 | 8 |
use 5.008001;
|
9 | 9 |
|
10 | |
our $VERSION = '0.21';
|
|
10 |
our $VERSION = '0.22';
|
11 | 11 |
|
12 | 12 |
sub handler {
|
13 | 13 |
my ($class, $code, ) = @_;
|
|
49 | 49 |
REMOTE_HOST => 'localhost',
|
50 | 50 |
REMOTE_PORT => int( rand(64000) + 1000 ), # not in RFC 3875
|
51 | 51 |
# REQUEST_URI => $uri->path_query, # not in RFC 3875
|
52 | |
( map { $_ => $env->{$_} } grep !/^psgix?\./, keys %$env )
|
|
52 |
( map { $_ => $env->{$_} } grep { !/^psgix?\./ && $_ ne "HTTP_PROXY" } keys %$env )
|
53 | 53 |
};
|
54 | 54 |
|
55 | 55 |
return wantarray ? %$environment : $environment;
|
|
0 |
use strict;
|
|
1 |
use warnings;
|
|
2 |
use CGI;
|
|
3 |
use CGI::Emulate::PSGI;
|
|
4 |
use Test::More;
|
|
5 |
|
|
6 |
my $handler = CGI::Emulate::PSGI->handler(
|
|
7 |
sub {
|
|
8 |
ok ! exists $ENV{HTTP_PROXY};
|
|
9 |
print "Content-Type: text/html; charset=utf-8\r\n";
|
|
10 |
print "Content-Length: 4\r\n";
|
|
11 |
print "\r\n";
|
|
12 |
print "KTKR";
|
|
13 |
}
|
|
14 |
);
|
|
15 |
|
|
16 |
my $input = "";
|
|
17 |
open my $in, '<', \$input;
|
|
18 |
open my $errors, '>', \my $err;
|
|
19 |
my $res = $handler->(
|
|
20 |
+{
|
|
21 |
'psgi.input' => $in,
|
|
22 |
REMOTE_ADDR => '192.168.1.1',
|
|
23 |
REQUEST_METHOD => 'GET',
|
|
24 |
HTTP_PROXY => 'localhost:3128',
|
|
25 |
'psgi.errors' => $errors,
|
|
26 |
}
|
|
27 |
);
|
|
28 |
|
|
29 |
|
|
30 |
is $res->[0], 200;
|
|
31 |
my $headers = +{@{$res->[1]}};
|
|
32 |
|
|
33 |
|
|
34 |
done_testing;
|
|
35 |
|
|
0 |
#!perl
|
|
1 |
|
|
2 |
BEGIN {
|
|
3 |
unless ($ENV{AUTHOR_TESTING}) {
|
|
4 |
print "1..0 # SKIP these tests are for testing by the author\n";
|
|
5 |
exit
|
|
6 |
}
|
|
7 |
}
|
|
8 |
|
|
9 |
# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
|
|
10 |
use strict; use warnings;
|
|
11 |
use Test::More;
|
|
12 |
use Test::Pod 1.41;
|
|
13 |
|
|
14 |
all_pod_files_ok();
|
0 | |
#!perl
|
1 | |
|
2 | |
BEGIN {
|
3 | |
unless ($ENV{RELEASE_TESTING}) {
|
4 | |
require Test::More;
|
5 | |
Test::More::plan(skip_all => 'these tests are for release candidate testing');
|
6 | |
}
|
7 | |
}
|
8 | |
|
9 | |
# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
|
10 | |
use Test::More;
|
11 | |
use Test::Pod 1.41;
|
12 | |
|
13 | |
all_pod_files_ok();
|