Codebase list libcgi-emulate-psgi-perl / 613b2c2
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
9 changed file(s) with 79 addition(s) and 36 deletion(s). Raw diff Collapse all Expand all
0 0.22 2016-07-19 08:03:23 PDT
1 - Do not set HTTP_PROXY (kazeburo) #14
2
03 0.21 2015-07-21 09:02:04 PDT
14 - Fix to restore the selected filehandle correctly #12
25
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.
11 Changes
22 LICENSE
33 MANIFEST
1515 t/03_socket.t
1616 t/04_utf8.t
1717 t/05_lint.t
18 t/release-pod-syntax.t
18 t/06_httproxy.t
19 t/author-pod-syntax.t
33 "Tokuhiro Matsuno <tokuhirom@cpan.org>"
44 ],
55 "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",
77 "license" : [
88 "perl_5"
99 ],
1414 "name" : "CGI-Emulate-PSGI",
1515 "no_index" : {
1616 "directory" : [
17 "t",
18 "xt",
17 "eg",
18 "examples",
1919 "inc",
2020 "share",
21 "eg",
22 "examples"
21 "t",
22 "xt"
2323 ]
2424 },
2525 "prereqs" : {
3030 },
3131 "develop" : {
3232 "requires" : {
33 "Dist::Milla" : "v1.0.15",
33 "Dist::Milla" : "v1.0.16",
3434 "Test::Pod" : "1.41"
3535 }
3636 },
6060 "web" : "https://github.com/tokuhirom/p5-cgi-emulate-psgi"
6161 }
6262 },
63 "version" : "0.21",
63 "version" : "0.22",
6464 "x_contributors" : [
6565 "Bastian Blank <waldi@debian.org>",
6666 "Clay Fouts <cfouts@liblime.com>",
6969 "James Wright <james2vegas@aim.com>",
7070 "Kazuho Oku <kazuhooku@gmail.com>",
7171 "Mark Stosberg <mark@stosberg.com>",
72 "Masahiro Nagano <kazeburo@gmail.com>",
7273 "Tatsuhiko Miyagawa <miyagawa@bulknews.net>",
7374 "Tokuhiro Matsuno <tokuhirom@gmail.com>"
74 ]
75 ],
76 "x_serialization_backend" : "Cpanel::JSON::XS version 3.0217"
7577 }
7678
77 configure_requires:
88 ExtUtils::MakeMaker: '0'
99 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'
1111 license: perl
1212 meta-spec:
1313 url: http://module-build.sourceforge.net/META-spec-v1.4.html
1515 name: CGI-Emulate-PSGI
1616 no_index:
1717 directory:
18 - eg
19 - examples
20 - inc
21 - share
1822 - t
1923 - xt
20 - inc
21 - share
22 - eg
23 - examples
2424 requires:
2525 CGI: '3.63'
2626 HTTP::Response: '0'
2929 bugtracker: https://github.com/tokuhirom/p5-cgi-emulate-psgi/issues
3030 homepage: https://github.com/tokuhirom/p5-cgi-emulate-psgi
3131 repository: https://github.com/tokuhirom/p5-cgi-emulate-psgi.git
32 version: '0.21'
32 version: '0.22'
3333 x_contributors:
3434 - 'Bastian Blank <waldi@debian.org>'
3535 - 'Clay Fouts <cfouts@liblime.com>'
3838 - 'James Wright <james2vegas@aim.com>'
3939 - 'Kazuho Oku <kazuhooku@gmail.com>'
4040 - 'Mark Stosberg <mark@stosberg.com>'
41 - 'Masahiro Nagano <kazeburo@gmail.com>'
4142 - 'Tatsuhiko Miyagawa <miyagawa@bulknews.net>'
4243 - '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.
11 use strict;
22 use warnings;
33
1212 "ExtUtils::MakeMaker" => 0
1313 },
1414 "DISTNAME" => "CGI-Emulate-PSGI",
15 "EXE_FILES" => [],
1615 "LICENSE" => "perl",
1716 "MIN_PERL_VERSION" => "5.008001",
1817 "NAME" => "CGI::Emulate::PSGI",
2423 "Test::More" => "0.88",
2524 "Test::Requires" => "0.08"
2625 },
27 "VERSION" => "0.21",
26 "VERSION" => "0.22",
2827 "test" => {
2928 "TESTS" => "t/*.t"
3029 }
3332
3433 my %FallbackPrereqs = (
3534 "CGI" => "3.63",
36 "ExtUtils::MakeMaker" => 0,
3735 "HTTP::Response" => 0,
3836 "Test::More" => "0.88",
3937 "Test::Requires" => "0.08"
77 use Carp qw(croak);
88 use 5.008001;
99
10 our $VERSION = '0.21';
10 our $VERSION = '0.22';
1111
1212 sub handler {
1313 my ($class, $code, ) = @_;
4949 REMOTE_HOST => 'localhost',
5050 REMOTE_PORT => int( rand(64000) + 1000 ), # not in RFC 3875
5151 # 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 )
5353 };
5454
5555 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
-14
t/release-pod-syntax.t less more
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();