line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::FastCGI::Constant; |
2
|
|
|
|
|
|
|
|
3
|
20
|
|
|
20
|
|
430673
|
use strict; |
|
20
|
|
|
|
|
44
|
|
|
20
|
|
|
|
|
678
|
|
4
|
20
|
|
|
20
|
|
114
|
use warnings; |
|
20
|
|
|
|
|
46
|
|
|
20
|
|
|
|
|
10226
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
BEGIN { |
7
|
20
|
|
|
20
|
|
51
|
our $VERSION = '0.14'; |
8
|
20
|
|
|
|
|
66
|
my @common = qw[ FCGI_MAX_CONTENT_LEN |
9
|
|
|
|
|
|
|
FCGI_MAX_LEN |
10
|
|
|
|
|
|
|
FCGI_HEADER_LEN |
11
|
|
|
|
|
|
|
FCGI_VERSION_1 |
12
|
|
|
|
|
|
|
FCGI_NULL_REQUEST_ID ]; |
13
|
|
|
|
|
|
|
|
14
|
20
|
|
|
|
|
82
|
my @type = qw[ FCGI_BEGIN_REQUEST |
15
|
|
|
|
|
|
|
FCGI_ABORT_REQUEST |
16
|
|
|
|
|
|
|
FCGI_END_REQUEST |
17
|
|
|
|
|
|
|
FCGI_PARAMS |
18
|
|
|
|
|
|
|
FCGI_STDIN |
19
|
|
|
|
|
|
|
FCGI_STDOUT |
20
|
|
|
|
|
|
|
FCGI_STDERR |
21
|
|
|
|
|
|
|
FCGI_DATA |
22
|
|
|
|
|
|
|
FCGI_GET_VALUES |
23
|
|
|
|
|
|
|
FCGI_GET_VALUES_RESULT |
24
|
|
|
|
|
|
|
FCGI_UNKNOWN_TYPE |
25
|
|
|
|
|
|
|
FCGI_MAXTYPE ]; |
26
|
|
|
|
|
|
|
|
27
|
20
|
|
|
|
|
59
|
my @role = qw[ FCGI_RESPONDER |
28
|
|
|
|
|
|
|
FCGI_AUTHORIZER |
29
|
|
|
|
|
|
|
FCGI_FILTER ]; |
30
|
|
|
|
|
|
|
|
31
|
20
|
|
|
|
|
182
|
my @flag = qw[ FCGI_KEEP_CONN ]; |
32
|
|
|
|
|
|
|
|
33
|
20
|
|
|
|
|
52
|
my @protocol_status = qw[ FCGI_REQUEST_COMPLETE |
34
|
|
|
|
|
|
|
FCGI_CANT_MPX_CONN |
35
|
|
|
|
|
|
|
FCGI_OVERLOADED |
36
|
|
|
|
|
|
|
FCGI_UNKNOWN_ROLE ]; |
37
|
|
|
|
|
|
|
|
38
|
20
|
|
|
|
|
61
|
my @value = qw[ FCGI_MAX_CONNS |
39
|
|
|
|
|
|
|
FCGI_MAX_REQS |
40
|
|
|
|
|
|
|
FCGI_MPXS_CONNS ]; |
41
|
|
|
|
|
|
|
|
42
|
20
|
|
|
|
|
50
|
my @pack = qw[ FCGI_Header |
43
|
|
|
|
|
|
|
FCGI_BeginRequestBody |
44
|
|
|
|
|
|
|
FCGI_EndRequestBody |
45
|
|
|
|
|
|
|
FCGI_UnknownTypeBody ]; |
46
|
|
|
|
|
|
|
|
47
|
20
|
|
|
|
|
48
|
my @name = qw[ @FCGI_TYPE_NAME |
48
|
|
|
|
|
|
|
@FCGI_RECORD_NAME |
49
|
|
|
|
|
|
|
@FCGI_ROLE_NAME |
50
|
|
|
|
|
|
|
@FCGI_PROTOCOL_STATUS_NAME ]; |
51
|
|
|
|
|
|
|
|
52
|
20
|
|
|
|
|
365
|
our @EXPORT_OK = ( @common, |
53
|
|
|
|
|
|
|
@type, |
54
|
|
|
|
|
|
|
@role, |
55
|
|
|
|
|
|
|
@flag, |
56
|
|
|
|
|
|
|
@protocol_status, |
57
|
|
|
|
|
|
|
@value, |
58
|
|
|
|
|
|
|
@pack, |
59
|
|
|
|
|
|
|
@name ); |
60
|
|
|
|
|
|
|
|
61
|
20
|
|
|
|
|
348
|
our %EXPORT_TAGS = ( all => \@EXPORT_OK, |
62
|
|
|
|
|
|
|
common => \@common, |
63
|
|
|
|
|
|
|
type => \@type, |
64
|
|
|
|
|
|
|
role => \@role, |
65
|
|
|
|
|
|
|
flag => \@flag, |
66
|
|
|
|
|
|
|
protocol_status => \@protocol_status, |
67
|
|
|
|
|
|
|
value => \@value, |
68
|
|
|
|
|
|
|
pack => \@pack ); |
69
|
|
|
|
|
|
|
|
70
|
20
|
|
|
|
|
89
|
our @FCGI_TYPE_NAME = ( |
71
|
|
|
|
|
|
|
undef, # 0 |
72
|
|
|
|
|
|
|
'FCGI_BEGIN_REQUEST', # 1 |
73
|
|
|
|
|
|
|
'FCGI_ABORT_REQUEST', # 2 |
74
|
|
|
|
|
|
|
'FCGI_END_REQUEST', # 3 |
75
|
|
|
|
|
|
|
'FCGI_PARAMS', # 4 |
76
|
|
|
|
|
|
|
'FCGI_STDIN', # 5 |
77
|
|
|
|
|
|
|
'FCGI_STDOUT', # 6 |
78
|
|
|
|
|
|
|
'FCGI_STDERR', # 7 |
79
|
|
|
|
|
|
|
'FCGI_DATA', # 8 |
80
|
|
|
|
|
|
|
'FCGI_GET_VALUES', # 9 |
81
|
|
|
|
|
|
|
'FCGI_GET_VALUES_RESULT', # 10 |
82
|
|
|
|
|
|
|
'FCGI_UNKNOWN_TYPE' # 11 |
83
|
|
|
|
|
|
|
); |
84
|
|
|
|
|
|
|
|
85
|
20
|
|
|
|
|
4556
|
our @FCGI_RECORD_NAME = ( |
86
|
|
|
|
|
|
|
undef, # 0 |
87
|
|
|
|
|
|
|
'FCGI_BeginRequestRecord', # 1 |
88
|
|
|
|
|
|
|
'FCGI_AbortRequestRecord', # 2 |
89
|
|
|
|
|
|
|
'FCGI_EndRequestRecord', # 3 |
90
|
|
|
|
|
|
|
'FCGI_ParamsRecord', # 4 |
91
|
|
|
|
|
|
|
'FCGI_StdinRecord', # 5 |
92
|
|
|
|
|
|
|
'FCGI_StdoutRecord', # 6 |
93
|
|
|
|
|
|
|
'FCGI_StderrRecord', # 7 |
94
|
|
|
|
|
|
|
'FCGI_DataRecord', # 8 |
95
|
|
|
|
|
|
|
'FCGI_GetValuesRecord', # 9 |
96
|
|
|
|
|
|
|
'FCGI_GetValuesResultRecord', # 10 |
97
|
|
|
|
|
|
|
'FCGI_UnknownTypeRecord', # 11 |
98
|
|
|
|
|
|
|
); |
99
|
|
|
|
|
|
|
|
100
|
20
|
|
|
|
|
72
|
our @FCGI_ROLE_NAME = ( |
101
|
|
|
|
|
|
|
undef, # 0 |
102
|
|
|
|
|
|
|
'FCGI_RESPONDER', # 1 |
103
|
|
|
|
|
|
|
'FCGI_AUTHORIZER', # 2 |
104
|
|
|
|
|
|
|
'FCGI_FILTER', # 3 |
105
|
|
|
|
|
|
|
); |
106
|
|
|
|
|
|
|
|
107
|
20
|
|
|
|
|
76
|
our @FCGI_PROTOCOL_STATUS_NAME = ( |
108
|
|
|
|
|
|
|
'FCGI_REQUEST_COMPLETE', # 0 |
109
|
|
|
|
|
|
|
'FCGI_CANT_MPX_CONN', # 1 |
110
|
|
|
|
|
|
|
'FCGI_OVERLOADED', # 2 |
111
|
|
|
|
|
|
|
'FCGI_UNKNOWN_ROLE', # 3 |
112
|
|
|
|
|
|
|
); |
113
|
|
|
|
|
|
|
|
114
|
20
|
50
|
|
|
|
524
|
if (Internals->can('SvREADONLY')) { # 5.8 |
115
|
20
|
|
|
|
|
74
|
Internals::SvREADONLY(@FCGI_TYPE_NAME, 1); |
116
|
20
|
|
|
|
|
58
|
Internals::SvREADONLY(@FCGI_RECORD_NAME, 1); |
117
|
20
|
|
|
|
|
47
|
Internals::SvREADONLY(@FCGI_ROLE_NAME, 1); |
118
|
20
|
|
|
|
|
51
|
Internals::SvREADONLY(@FCGI_PROTOCOL_STATUS_NAME, 1); |
119
|
20
|
|
|
|
|
459
|
Internals::SvREADONLY($_, 1) for @FCGI_TYPE_NAME, |
120
|
|
|
|
|
|
|
@FCGI_RECORD_NAME, |
121
|
|
|
|
|
|
|
@FCGI_ROLE_NAME, |
122
|
|
|
|
|
|
|
@FCGI_PROTOCOL_STATUS_NAME; |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
|
125
|
20
|
|
|
|
|
230
|
require Exporter; |
126
|
20
|
|
|
|
|
10419
|
*import = \&Exporter::import; |
127
|
|
|
|
|
|
|
} |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
sub FCGI_LISTENSOCK_FILENO () { 0 } |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
# common |
133
|
|
|
|
|
|
|
sub FCGI_MAX_CONTENT_LEN () { 0xFFFF } |
134
|
|
|
|
|
|
|
sub FCGI_MAX_LEN () { 0xFFFF } # deprecated |
135
|
|
|
|
|
|
|
sub FCGI_HEADER_LEN () { 8 } |
136
|
|
|
|
|
|
|
sub FCGI_VERSION_1 () { 1 } |
137
|
|
|
|
|
|
|
sub FCGI_NULL_REQUEST_ID () { 0 } |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
# type |
140
|
|
|
|
|
|
|
sub FCGI_BEGIN_REQUEST () { 1 } |
141
|
|
|
|
|
|
|
sub FCGI_ABORT_REQUEST () { 2 } |
142
|
|
|
|
|
|
|
sub FCGI_END_REQUEST () { 3 } |
143
|
|
|
|
|
|
|
sub FCGI_PARAMS () { 4 } |
144
|
|
|
|
|
|
|
sub FCGI_STDIN () { 5 } |
145
|
|
|
|
|
|
|
sub FCGI_STDOUT () { 6 } |
146
|
|
|
|
|
|
|
sub FCGI_STDERR () { 7 } |
147
|
|
|
|
|
|
|
sub FCGI_DATA () { 8 } |
148
|
|
|
|
|
|
|
sub FCGI_GET_VALUES () { 9 } |
149
|
|
|
|
|
|
|
sub FCGI_GET_VALUES_RESULT () { 10 } |
150
|
|
|
|
|
|
|
sub FCGI_UNKNOWN_TYPE () { 11 } |
151
|
|
|
|
|
|
|
sub FCGI_MAXTYPE () { FCGI_UNKNOWN_TYPE } |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
# role |
154
|
|
|
|
|
|
|
sub FCGI_RESPONDER () { 1 } |
155
|
|
|
|
|
|
|
sub FCGI_AUTHORIZER () { 2 } |
156
|
|
|
|
|
|
|
sub FCGI_FILTER () { 3 } |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
# flags |
159
|
|
|
|
|
|
|
sub FCGI_KEEP_CONN () { 1 } |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
# protocol status |
162
|
|
|
|
|
|
|
sub FCGI_REQUEST_COMPLETE () { 0 } |
163
|
|
|
|
|
|
|
sub FCGI_CANT_MPX_CONN () { 1 } |
164
|
|
|
|
|
|
|
sub FCGI_OVERLOADED () { 2 } |
165
|
|
|
|
|
|
|
sub FCGI_UNKNOWN_ROLE () { 3 } |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
# value |
168
|
|
|
|
|
|
|
sub FCGI_MAX_CONNS () { 'FCGI_MAX_CONNS' } |
169
|
|
|
|
|
|
|
sub FCGI_MAX_REQS () { 'FCGI_MAX_REQS' } |
170
|
|
|
|
|
|
|
sub FCGI_MPXS_CONNS () { 'FCGI_MPXS_CONNS' } |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
# pack |
173
|
|
|
|
|
|
|
sub FCGI_Header () { 'CCnnCx' } |
174
|
|
|
|
|
|
|
sub FCGI_BeginRequestBody () { 'nCx5' } |
175
|
|
|
|
|
|
|
sub FCGI_EndRequestBody () { 'NCx3' } |
176
|
|
|
|
|
|
|
sub FCGI_UnknownTypeBody () { 'Cx7' } |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
1; |
179
|
|
|
|
|
|
|
|