Permalink
Browse files

Specify psgi.run_once as per PSGI 1.1 spec.

* also fix t/60-plack.t since changing the version number
  • Loading branch information...
1 parent 8547dc8 commit e53918d32d1edde7aa8ec8f5bc0e231b7b8ecfc2 @stash committed Nov 22, 2010
Showing with 4 additions and 2 deletions.
  1. +1 −0 Feersum.xs
  2. +2 −1 t/03-env-hash.t
  3. +1 −1 t/60-plack.t
View
@@ -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);
View
@@ -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;
@@ -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';
View
@@ -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 {

0 comments on commit e53918d

Please sign in to comment.