Permalink
Browse files

* Change (psgix.harakiri.supported,psgix.harakiri) into (psgix.haraki…

…ri,psgix.harakiri.commit) as per miyagawa++.
  • Loading branch information...
1 parent d837c4c commit 63884d2763e6c5eb9e4c5b4ba179d59da55bb5e6 @audreyt committed Jun 16, 2011
Showing with 3 additions and 2 deletions.
  1. +2 −1 lib/Starlet/Server.pm
  2. +1 −1 t/06harakiri.t
View
3 lib/Starlet/Server.pm
@@ -116,6 +116,7 @@ sub accept_loop {
'psgi.nonblocking' => Plack::Util::FALSE,
'psgix.input.buffered' => Plack::Util::TRUE,
'psgix.io' => $conn,
+ 'psgix.harakiri' => 1,
};
# no need to take care of pipelining since this module is a HTTP/1.0 server
@@ -126,7 +127,7 @@ sub accept_loop {
my $use_keepalive = $self->handle_connection($env, $conn, $app, $may_keepalive, $req_count != 1);
- if ($env->{'psgix.harakiri'}) {
+ if ($env->{'psgix.harakiri.commit'}) {
$conn->close;
return;
}
View
2 t/06harakiri.t
@@ -26,7 +26,7 @@ test_psgi
test_psgi
app => sub {
my $env = shift;
- $env->{'psgix.harakiri'} = 1;
+ $env->{'psgix.harakiri.commit'} = $env->{'psgix.harakiri'};
return [ 200, [ 'Content-Type' => 'text/plain' ], [$$] ];
},
client => sub {

0 comments on commit 63884d2

Please sign in to comment.