applicationは
use Starlet;
print $Starlet::VERSION,"\n";
my $content="x"x4000;
sub{[200,[],[$content]]}
こんなの。4000byteのbodyを返す。 閾値を1024と4096で変更しながらテスト
| use Plack::App::CGIBin; | |
| use Plack::App::PHPCGIFile; | |
| use Plack::Builder; | |
| use Plack::Builder::Conditionals; | |
| my $cgibin = Plack::App::CGIBin->new( | |
| root => "/usr/local/nagios/sbin", | |
| exec_cb => sub { my $file = shift; $file =~ m!\.cgi$! and -x $file }, | |
| )->to_app; | |
| my $htdocs = Plack::App::PHPCGIFile->new( |
| diff --git a/lib/Furl/HTTP.pm b/lib/Furl/HTTP.pm | |
| index 176786d..eec57ef 100644 | |
| --- a/lib/Furl/HTTP.pm | |
| +++ b/lib/Furl/HTTP.pm | |
| @@ -568,10 +568,11 @@ sub connect :method { | |
| sub _ssl_opts { | |
| my $self = shift; | |
| my $ssl_opts = $self->{ssl_opts}; | |
| - unless (exists $ssl_opts->{SSL_verify_mode} && exists $ssl_opts->{SSL_verifycn_scheme}) { | |
| + if (!exists $ssl_opts->{SSL_verify_mode} ) { |
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| use Carp; | |
| use HTTP::Request::Common; | |
| use HTTP::Message::PSGI; | |
| use POSIX (); | |
| my $tzoffset = POSIX::strftime("%z", localtime) !~ /^[+-]\d{4}$/ && do { | |
| require Time::Local; |
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use HTTP::Request::Common; | |
| use HTTP::Message::PSGI; | |
| use Plack::Test; | |
| use Plack::Builder; | |
| use Benchmark qw/cmpthese timethese/; | |
| use File::Spec; |
| diff --git a/lib/Plack/Request.pm b/lib/Plack/Request.pm | |
| index 26e7a86..070558a 100644 | |
| --- a/lib/Plack/Request.pm | |
| +++ b/lib/Plack/Request.pm | |
| @@ -77,9 +77,18 @@ sub cookies { | |
| sub query_parameters { | |
| my $self = shift; | |
| - my @combined = $self->uri->query_form; | |
| - @combined = (@combined, map { $_, '' } $self->uri->query_keywords); |
| diff --git a/lib/Starlet/Server.pm b/lib/Starlet/Server.pm | |
| index 4b0bcdc..45664a3 100644 | |
| --- a/lib/Starlet/Server.pm | |
| +++ b/lib/Starlet/Server.pm | |
| @@ -89,8 +89,25 @@ sub accept_loop { | |
| my($self, $app, $max_reqs_per_child) = @_; | |
| my $proc_req_count = 0; | |
| + $self->{can_exit} = 1; | |
| + $self->{term_received} = 0; |
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| use Carp; | |
| use Log::Minimal; | |
| use IO::Socket::INET; | |
| use POSIX qw(EINTR EAGAIN EWOULDBLOCK); | |
| use Socket qw(IPPROTO_TCP TCP_NODELAY); | |
| use HTTP::Parser::XS qw/HEADERS_NONE HEADERS_AS_ARRAYREF HEADERS_AS_HASHREF/; |
applicationは
use Starlet;
print $Starlet::VERSION,"\n";
my $content="x"x4000;
sub{[200,[],[$content]]}
こんなの。4000byteのbodyを返す。 閾値を1024と4096で変更しながらテスト
| diff --git a/Makefile.PL b/Makefile.PL | |
| index c690aab..21e6d45 100644 | |
| --- a/Makefile.PL | |
| +++ b/Makefile.PL | |
| @@ -15,6 +15,8 @@ requires 'Try::Tiny'; | |
| requires 'parent'; | |
| requires 'Stream::Buffered', '0.02'; | |
| +requires 'Apache::LogFormat::Compiler', '0.05'; # Middleware::AccessLog | |
| + |
| diff -ur Alien-RRDtool-0.03.orig/Makefile.PL Alien-RRDtool-0.03/Makefile.PL | |
| --- Alien-RRDtool-0.03.orig/Makefile.PL 2012-05-17 14:41:03.000000000 +0900 | |
| +++ Alien-RRDtool-0.03/Makefile.PL 2013-03-29 17:13:39.000000000 +0900 | |
| @@ -18,6 +18,7 @@ | |
| print "# => ", scalar mirror($rrdtool, "$name.tar.gz"), "\n"; | |
| print "# unpacking $name.tar.gz\n"; | |
| system("tar", "xzf", "$name.tar.gz"); | |
| +system("cd ${name}-1.4.7 && cat ../rrdtool.patch | patch -p1"); | |
| rmtree($name); | |
| my $version = do { |