This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use FindBin; | |
use Cwd qw/realpath/; | |
use lib "$FindBin::Bin/../../../local-lib/lib/perl5"; | |
use local::lib '--self-contained', "$FindBin::Bin/../../../local-lib/"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmark: running data_recursive, data_rmap, data_visitor for at least 1 CPU seconds... | |
data_recursive: 2 wallclock secs ( 1.01 usr + 0.00 sys = 1.01 CPU) @ 17970.30/s (n=18150) | |
data_rmap: 1 wallclock secs ( 1.00 usr + 0.00 sys = 1.00 CPU) @ 7168.00/s (n=7168) | |
data_visitor: 1 wallclock secs ( 1.02 usr + 0.00 sys = 1.02 CPU) @ 6200.00/s (n=6324) | |
Rate data_visitor data_rmap data_recursive | |
data_visitor 6200/s -- -14% -65% | |
data_rmap 7168/s 16% -- -60% | |
data_recursive 17970/s 190% 151% -- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/HTTP/Server/PSGI.pm b/lib/HTTP/Server/PSGI.pm | |
index 64c4099..5895efc 100644 | |
--- a/lib/HTTP/Server/PSGI.pm | |
+++ b/lib/HTTP/Server/PSGI.pm | |
@@ -42,8 +42,16 @@ sub new { | |
server_ready => $args{server_ready} || sub {}, | |
max_workers => $args{max_workers} || 1, | |
max_reqs_per_child => $args{max_reqs_per_child} || 100, | |
+ ssl => exists $args{ssl} ? 1 : 0, | |
+ ssl_key_file => $args{ssl_key_file} || 'certs/server-key.pem', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Plack/Server/Coro.pm b/lib/Plack/Server/Coro.pm | |
index 38ed29a..a534128 100644 | |
--- a/lib/Plack/Server/Coro.pm | |
+++ b/lib/Plack/Server/Coro.pm | |
@@ -13,7 +13,14 @@ sub new { | |
sub run { | |
my($self, $app) = @_; | |
- my $server = Plack::Server::Coro::Server->new(host => $self->{host} || '*'); | |
+ my $server = Plack::Server::Coro::Server->new( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ndex: lib/Net/Server/SS/PreFork.pm | |
=================================================================== | |
--- lib/Net/Server/SS/PreFork.pm (リビジョン 36666) | |
+++ lib/Net/Server/SS/PreFork.pm (作業コピー) | |
@@ -59,6 +59,8 @@ | |
); | |
} | |
+sub shutdown_sockets {} | |
+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Plack/Loader/Restarter.pm b/lib/Plack/Loader/Restarter.pm | |
index 4a79bbd..b072c16 100644 | |
--- a/lib/Plack/Loader/Restarter.pm | |
+++ b/lib/Plack/Loader/Restarter.pm | |
@@ -23,6 +23,11 @@ sub watch { | |
sub _fork_and_start { | |
my($self, $server) = @_; | |
+ $SIG{INT} = $SIG{TERM} = $SIG{QUIT} = sub { | |
+ $self->_kill_child; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ログ流れたので貼り付けますー | |
環境はlinuxです。 | |
23:40 >#soozy|freenode:chiba< kazuho____: Net-Server-SS-PreFork-0.04がテスト自体は通るんですが、t/01-httpd.plのプロセスが残っちゃってテストが止まっちゃうです。 | |
00:19 >#soozy|freenode:chiba< 現象的にはNet::Server::PreForkのfork途中にTERMされるとNet::Serverのshutdownで全部killできてないって感じっぽくて02-multiport.tのclientの最初とかでsleepすると問題なくなるですね | |
00:20 >#soozy|freenode:chiba< あと、incに入ってるHTTP::Server::Simple::CGIを最新に更新してもうちの環境では問題なかったです | |
↓の状態で止まるです | |
% make test | |
cp lib/Net/Server/SS/PreFork.pm blib/lib/Net/Server/SS/PreFork.pm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub scale { | |
my ($imagers, %opt) = @_; | |
my $xfactor = $opt{xpixels} / $imagers->[0]->getwidth; | |
my $yfactor = $opt{ypixels} / $imagers->[0]->getheight; | |
my $factor = [$xfactor => $yfactor] -> [$yfactor <= $xfactor]; | |
my @delays = _get_delays($imagers); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Plack/Test/Suite.pm b/lib/Plack/Test/Suite.pm | |
index 7189243..c575ce5 100644 | |
--- a/lib/Plack/Test/Suite.pm | |
+++ b/lib/Plack/Test/Suite.pm | |
@@ -614,6 +614,24 @@ our @TEST = ( | |
return [ 200, [ "Content-Type", "text/plain" ], [ "OK" ] ]; | |
}, | |
], | |
+ [ | |
+ 'Content-Length => 0 is not set Transfer-Encoding # regression test', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Path::Class qw/dir/; | |
foreach my $path ( @{$tx->{path}} ) { | |
dir($path)->recurse(callback => sub { | |
my $file = shift; | |
if ( $file =~ /^$path(.*$tx->{suffix})$/ ) { | |
$tx->load_file($1); | |
} | |
}); | |
} |