r76361 - in /trunk/starman: Changes MANIFEST META.yml bin/starman debian/changelog lib/Starman.pm lib/Starman/Server.pm t/harakiri.t

ghedo-guest at users.alioth.debian.org ghedo-guest at users.alioth.debian.org
Thu Jun 23 14:06:40 UTC 2011


Author: ghedo-guest
Date: Thu Jun 23 14:06:31 2011
New Revision: 76361

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=76361
Log:
New upstream release

Added:
    trunk/starman/t/harakiri.t
      - copied unchanged from r76360, branches/upstream/starman/current/t/harakiri.t
Modified:
    trunk/starman/Changes
    trunk/starman/MANIFEST
    trunk/starman/META.yml
    trunk/starman/bin/starman
    trunk/starman/debian/changelog
    trunk/starman/lib/Starman.pm
    trunk/starman/lib/Starman/Server.pm

Modified: trunk/starman/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/starman/Changes?rev=76361&op=diff
==============================================================================
--- trunk/starman/Changes (original)
+++ trunk/starman/Changes Thu Jun 23 14:06:31 2011
@@ -1,4 +1,8 @@
 Revision history for Perl extension Starman
+
+0.2012  Wed Jun 22 13:51:59 PDT 2011
+        - Implemented psgix.harakiri mode (audreyt)
+        - Added --error-log option (Paulo E. Castro)
 
 0.2011  Tue May 24 09:41:52 PDT 2011
         - Fix chunked response with 0-length PSGI array elements (chmrr)

Modified: trunk/starman/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/starman/MANIFEST?rev=76361&op=diff
==============================================================================
--- trunk/starman/MANIFEST (original)
+++ trunk/starman/MANIFEST Thu Jun 23 14:06:31 2011
@@ -26,6 +26,7 @@
 t/chunked_zero_length.t
 t/findbin.psgi
 t/findbin.t
+t/harakiri.t
 t/rand.psgi
 t/rand.t
 t/suite.t

Modified: trunk/starman/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/starman/META.yml?rev=76361&op=diff
==============================================================================
--- trunk/starman/META.yml (original)
+++ trunk/starman/META.yml Thu Jun 23 14:06:31 2011
@@ -36,4 +36,4 @@
 resources:
   license: http://dev.perl.org/licenses/
   repository: git://github.com/miyagawa/Starman.git
-version: 0.2011
+version: 0.2012

Modified: trunk/starman/bin/starman
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/starman/bin/starman?rev=76361&op=diff
==============================================================================
--- trunk/starman/bin/starman (original)
+++ trunk/starman/bin/starman Thu Jun 23 14:06:31 2011
@@ -171,6 +171,11 @@
 Specify the pid file path. Use it with C<-D|--daemonize> option,
 described in C<plackup -h>.
 
+=item --error-log
+
+Specify the pathname of a file where the error log should be written.
+This enables you to still have access to the errors when using C<--daemonize>.
+
 =back
 
 Starman passes through other options given to L<Plack::Runner>, the

Modified: trunk/starman/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/starman/debian/changelog?rev=76361&op=diff
==============================================================================
--- trunk/starman/debian/changelog (original)
+++ trunk/starman/debian/changelog Thu Jun 23 14:06:31 2011
@@ -1,3 +1,9 @@
+starman (0.2012-1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Alessandro Ghedini <al3xbio at gmail.com>  Thu, 23 Jun 2011 16:02:28 +0200
+
 starman (0.2011-1) unstable; urgency=low
 
   * New upstream release

Modified: trunk/starman/lib/Starman.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/starman/lib/Starman.pm?rev=76361&op=diff
==============================================================================
--- trunk/starman/lib/Starman.pm (original)
+++ trunk/starman/lib/Starman.pm Thu Jun 23 14:06:31 2011
@@ -2,7 +2,7 @@
 
 use strict;
 use 5.008_001;
-our $VERSION = '0.2011';
+our $VERSION = '0.2012';
 
 1;
 __END__

Modified: trunk/starman/lib/Starman/Server.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/starman/lib/Starman/Server.pm?rev=76361&op=diff
==============================================================================
--- trunk/starman/lib/Starman/Server.pm (original)
+++ trunk/starman/lib/Starman/Server.pm Thu Jun 23 14:06:31 2011
@@ -39,6 +39,10 @@
     }
     if (! exists $options->{keepalive_timeout}) {
         $options->{keepalive_timeout} = 1;
+    }
+    # Making it prettier I guess ? We can always get rid of it if we don't mind $options->{'error-log'}
+    if ($options->{'error-log'}) {
+        $options->{error_log} = 1;
     }
 
     my($host, $port, $proto);
@@ -64,6 +68,7 @@
         proto                      => $proto,
         serialize                  => 'flock',
         log_level                  => DEBUG ? 4 : 2,
+        ($options->{error_log} ? ( log_file => $options->{error_log} ) : () ),
         min_servers                => $options->{min_servers}       || $workers,
         min_spare_servers          => $options->{min_spare_servers} || $workers - 1,
         max_spare_servers          => $options->{max_spare_servers} || $workers - 1,
@@ -156,6 +161,7 @@
             'psgi.multiprocess' => Plack::Util::TRUE,
             'psgix.io'          => $conn,
             'psgix.input.buffered' => Plack::Util::TRUE,
+            'psgix.harakiri' => Plack::Util::TRUE,
         };
 
         # Parse headers
@@ -233,7 +239,7 @@
             if ( $self->{client}->{inputbuf} ) {
                 if ( $self->{client}->{inputbuf} =~ /^(?:GET|HEAD)/ ) {
                     if ( DEBUG ) {
-                        warn "Pipelined GET/HEAD request in input buffer: " 
+                        warn "Pipelined GET/HEAD request in input buffer: "
                             . dump( $self->{client}->{inputbuf} ) . "\n";
                     }
 
@@ -395,6 +401,11 @@
 
 sub _finalize_response {
     my($self, $env, $res) = @_;
+
+    if ($env->{'psgix.harakiri.commit'}) {
+        $self->{client}->{keepalive} = 0;
+        $self->{client}->{harakiri} = 1;
+    }
 
     my $protocol = $env->{SERVER_PROTOCOL};
     my $status   = $res->[0];
@@ -480,4 +491,11 @@
     }
 }
 
+sub post_client_connection_hook {
+    my $self = shift;
+    if ($self->{client}->{harakiri}) {
+        exit;
+    }
+}
+
 1;




More information about the Pkg-perl-cvs-commits mailing list