git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org, "Sam Vilain" <sam.vilain@catalyst.net.nz>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [PATCH/RFC v2] gitweb: Run in FastCGI mode if gitweb script has  .fcgi extension
Date: Mon, 7 Jun 2010 01:48:03 +0530	[thread overview]
Message-ID: <AANLkTimApmqQmbsIkfKmgXAMTaoQqDV5fU3S7SwXoScY@mail.gmail.com> (raw)
In-Reply-To: <201006062209.53176.jnareb@gmail.com>

> @@ -1056,19 +1056,24 @@ our $is_last_request = sub { 1 };
>  our ($pre_dispatch_hook, $post_dispatch_hook, $pre_listen_hook);
>  our $CGI = 'CGI';
>  our $cgi;
> +sub configure_as_fcgi {
> +       require CGI::Fast;
> +       our $CGI = 'CGI::Fast';
> +
> +       my $request_number = 0;
> +       # let each child service 100 requests
> +       our $is_last_request = sub { ++$request_number > 100 };
> +}

You missed to put a new line in here.

>  sub evaluate_argv {
> +       my $script_name = $ENV{'SCRIPT_NAME'} || $ENV{'SCRIPT_FILENAME'} || __FILE__;
> +       configure_as_fcgi()
> +               if $script_name =~ /\.fcgi$/;
> +
>        return unless (@ARGV);
>
>        require Getopt::Long;
>        Getopt::Long::GetOptions(
> -               'fastcgi|fcgi|f' => sub {
> -                       require CGI::Fast;
> -                       our $CGI = 'CGI::Fast';
> -
> -                       my $request_number = 0;
> -                       # let each child service 100 requests
> -                       our $is_last_request = sub { ++$request_number > 100 };
> -               },
> +               'fastcgi|fcgi|f' => \&configure_as_fcgi,
>                'nproc|n=i' => sub {
>                        my ($arg, $val) = @_;
>                        return unless eval { require FCGI::ProcManager; 1; };
> --
> 1.7.0.1

Thanks,
Pavan.

      reply	other threads:[~2010-06-06 20:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-05 21:11 [PATCH/RFC] gitweb: Run in FastCGI mode if gitweb script has .fcgi extension Jakub Narebski
2010-06-05 21:12 ` Ævar Arnfjörð Bjarmason
2010-06-06 20:09 ` [PATCH/RFC v2] " Jakub Narebski
2010-06-06 20:18   ` Pavan Kumar Sunkara [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTimApmqQmbsIkfKmgXAMTaoQqDV5fU3S7SwXoScY@mail.gmail.com \
    --to=pavan.sss1991@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    --cc=sam.vilain@catalyst.net.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).