Skip to content

Commit

Permalink
Specify psgi.run_once as per PSGI 1.1 spec.
Browse files Browse the repository at this point in the history
* also fix t/60-plack.t since changing the version number
  • Loading branch information
stash committed Nov 22, 2010
1 parent 8547dc8 commit e53918d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Feersum.xs
Expand Up @@ -1298,6 +1298,7 @@ feersum_init_tmpl_env(pTHX)
// constants
hv_stores(e, "psgi.version", newRV((SV*)psgi_ver));
hv_stores(e, "psgi.url_scheme", newSVpvs("http"));
hv_stores(e, "psgi.run_once", &PL_sv_no);
hv_stores(e, "psgi.nonblocking", &PL_sv_yes);
hv_stores(e, "psgi.multithread", &PL_sv_no);
hv_stores(e, "psgi.multiprocess", &PL_sv_no);
Expand Down
3 changes: 2 additions & 1 deletion t/03-env-hash.t
@@ -1,7 +1,7 @@
#!perl
use warnings;
use strict;
use Test::More tests => 139;
use Test::More tests => 143;
use Test::Exception;
use utf8;
use lib 't'; use Utils;
Expand Down Expand Up @@ -35,6 +35,7 @@ $evh->request_handler(sub {

is_deeply $env->{'psgi.version'}, [1,1], 'got psgi.version';
is $env->{'psgi.url_scheme'}, "http", 'got psgi.url_scheme';
ok exists $env->{'psgi.run_once'}, 'got psgi.run_once';
ok $env->{'psgi.nonblocking'}, 'got psgi.nonblocking';
is $env->{'psgi.multithread'}, '', 'got psgi.multithread';
is $env->{'psgi.multiprocess'}, '', 'got psgi.multiprocess';
Expand Down
2 changes: 1 addition & 1 deletion t/60-plack.t
Expand Up @@ -33,7 +33,7 @@ Plack::Test::Server::test_psgi(
app => sub {
my $env = shift;
ok $env->{'psgix.body.scalar_refs'}, "seems to be Feersum";
is_deeply $env->{'psgi.version'}, [1,0], "is PSGI 1.0";
is_deeply $env->{'psgi.version'}, [1,1], "is PSGI 1.1";
return [ 200, [ 'Content-Type' => 'text/plain' ], [ "Hello World" ] ],
},
client => sub {
Expand Down

0 comments on commit e53918d

Please sign in to comment.