line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id$ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
package CatalystX::Plugin::Engine::FastCGI::Lighttpd; |
5
|
1
|
|
|
1
|
|
36998
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
6
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
7
|
1
|
|
|
1
|
|
4
|
use utf8; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
8
|
|
8
|
1
|
|
|
1
|
|
30
|
use version; our $VERSION = qv('0.1.0'); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
7
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub handle_request { |
11
|
0
|
|
|
0
|
1
|
|
my ( $c, %args ) = @_; |
12
|
|
|
|
|
|
|
|
13
|
0
|
|
|
|
|
|
my $env_ref = $args{env}; |
14
|
|
|
|
|
|
|
|
15
|
0
|
0
|
0
|
|
|
|
if ( ( $env_ref->{SERVER_SOFTWARE} || q{} ) !~ /lighttpd/msx ) { |
16
|
0
|
|
|
|
|
|
$c->log->warn( $env_ref->{SERVER_SOFTWARE} |
17
|
|
|
|
|
|
|
. ': This plugin should run on Lighttpd.' ); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
0
|
0
|
|
|
|
|
if ( !$c->engine->isa('Catalyst::Engine::FastCGI') ) { |
21
|
0
|
|
|
|
|
|
$c->log->warn( |
22
|
|
|
|
|
|
|
( ref $c->engine ) . ': This plugin should run on FastCGI.' ); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
( $env_ref->{PATH_INFO}, $env_ref->{QUERY_STRING} ) = |
26
|
|
|
|
|
|
|
( split /\?/msx, $env_ref->{REQUEST_URI}, 2 ); |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
0
|
|
|
|
$env_ref->{HTTP_X_FORWARDED_HOST} ||= $env_ref->{HTTP_X_HOST}; |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return $c->next::method(%args); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |