line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Net::ICAP::Common -- Common ICAP Constants |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# (c) 2012, Arthur Corliss |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# $Revision: 0.04 $ |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# This software is licensed under the same terms as Perl, itself. |
8
|
|
|
|
|
|
|
# Please see http://dev.perl.org/licenses/ for more information. |
9
|
|
|
|
|
|
|
# |
10
|
|
|
|
|
|
|
##################################################################### |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
##################################################################### |
13
|
|
|
|
|
|
|
# |
14
|
|
|
|
|
|
|
# Environment definitions |
15
|
|
|
|
|
|
|
# |
16
|
|
|
|
|
|
|
##################################################################### |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
package Net::ICAP::Common; |
19
|
|
|
|
|
|
|
|
20
|
4
|
|
|
4
|
|
13684
|
use 5.008003; |
|
4
|
|
|
|
|
13
|
|
21
|
|
|
|
|
|
|
|
22
|
4
|
|
|
4
|
|
20
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
97
|
|
23
|
4
|
|
|
4
|
|
23
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
107
|
|
24
|
4
|
|
|
4
|
|
18
|
use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS @ISA $VERSION); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
249
|
|
25
|
4
|
|
|
4
|
|
21
|
use Exporter; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
524
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
($VERSION) = ( q$Revision: 0.04 $ =~ /(\d+(?:\.(\d+))+)/s ); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
@ISA = qw(Exporter); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
my @debug = qw(ICAPDEBUG1 ICAPDEBUG2 ICAPDEBUG3 ICAPDEBUG4); |
32
|
|
|
|
|
|
|
my @req = qw(ICAP_REQMOD ICAP_RESPMOD ICAP_OPTIONS); |
33
|
|
|
|
|
|
|
my @resp = qw(ICAP_CONTINUE ICAP_OK ICAP_NO_MOD_NEEDED ICAP_BAD_REQUEST |
34
|
|
|
|
|
|
|
ICAP_UNAUTHORIZED ICAP_FORBIDDEN ICAP_SERVICE_NOT_FOUND |
35
|
|
|
|
|
|
|
ICAP_METHOD_NOT_ALLOWED ICAP_AUTH_REQUIRED ICAP_REQUEST_TIMEOUT |
36
|
|
|
|
|
|
|
ICAP_LENGTH_REQUIRED ICAP_URI_TOO_LARGE |
37
|
|
|
|
|
|
|
ICAP_SERVER_ERROR ICAP_METHOD_NOT_IMPLEMENTED ICAP_BAD_GATEWAY |
38
|
|
|
|
|
|
|
ICAP_SERVICE_OVERLOADED ICAP_GATEWAY_TIMEOUT ICAP_VERSION_NOT_SUPPORTED); |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
@EXPORT = qw(ICAP_VERSION ICAP_REQ_HDR ICAP_RES_HDR ICAP_REQ_BODY |
41
|
|
|
|
|
|
|
ICAP_RES_BODY ICAP_OPT_BODY ICAP_NULL_BODY ICAP_DEF_PORT); |
42
|
|
|
|
|
|
|
@EXPORT_OK = ( @EXPORT, @debug, @req, @resp ); |
43
|
|
|
|
|
|
|
%EXPORT_TAGS = ( |
44
|
|
|
|
|
|
|
all => [@EXPORT_OK], |
45
|
|
|
|
|
|
|
std => [@EXPORT], |
46
|
|
|
|
|
|
|
debug => [@debug], |
47
|
|
|
|
|
|
|
req => [@req], |
48
|
|
|
|
|
|
|
resp => [@resp], |
49
|
|
|
|
|
|
|
); |
50
|
|
|
|
|
|
|
|
51
|
4
|
|
|
4
|
|
25
|
use constant ICAPDEBUG1 => 5; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
204
|
|
52
|
4
|
|
|
4
|
|
20
|
use constant ICAPDEBUG2 => 6; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
143
|
|
53
|
4
|
|
|
4
|
|
18
|
use constant ICAPDEBUG3 => 7; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
127
|
|
54
|
4
|
|
|
4
|
|
18
|
use constant ICAPDEBUG4 => 8; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
144
|
|
55
|
|
|
|
|
|
|
|
56
|
4
|
|
|
4
|
|
27
|
use constant ICAP_DEF_PORT => 1344; |
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
135
|
|
57
|
4
|
|
|
4
|
|
21
|
use constant ICAP_VERSION => 'ICAP/1.0'; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
141
|
|
58
|
|
|
|
|
|
|
|
59
|
4
|
|
|
4
|
|
19
|
use constant ICAP_REQ_HDR => 'req-hdr'; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
130
|
|
60
|
4
|
|
|
4
|
|
18
|
use constant ICAP_RES_HDR => 'res-hdr'; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
134
|
|
61
|
4
|
|
|
4
|
|
18
|
use constant ICAP_REQ_BODY => 'req-body'; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
144
|
|
62
|
4
|
|
|
4
|
|
19
|
use constant ICAP_RES_BODY => 'res-body'; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
144
|
|
63
|
4
|
|
|
4
|
|
20
|
use constant ICAP_OPT_BODY => 'opt-body'; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
141
|
|
64
|
4
|
|
|
4
|
|
19
|
use constant ICAP_NULL_BODY => 'null-body'; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
143
|
|
65
|
|
|
|
|
|
|
|
66
|
4
|
|
|
4
|
|
19
|
use constant ICAP_REQMOD => 'REQMOD'; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
136
|
|
67
|
4
|
|
|
4
|
|
18
|
use constant ICAP_RESPMOD => 'RESPMOD'; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
126
|
|
68
|
4
|
|
|
4
|
|
17
|
use constant ICAP_OPTIONS => 'OPTIONS'; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
125
|
|
69
|
|
|
|
|
|
|
|
70
|
4
|
|
|
4
|
|
18
|
use constant ICAP_CONTINUE => 100; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
140
|
|
71
|
4
|
|
|
4
|
|
19
|
use constant ICAP_OK => 200; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
133
|
|
72
|
4
|
|
|
4
|
|
18
|
use constant ICAP_NO_MOD_NEEDED => 204; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
124
|
|
73
|
4
|
|
|
4
|
|
18
|
use constant ICAP_BAD_REQUEST => 400; |
|
4
|
|
|
|
|
20
|
|
|
4
|
|
|
|
|
133
|
|
74
|
4
|
|
|
4
|
|
20
|
use constant ICAP_UNAUTHORIZED => 401; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
138
|
|
75
|
4
|
|
|
4
|
|
40
|
use constant ICAP_FORBIDDEN => 403; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
128
|
|
76
|
4
|
|
|
4
|
|
17
|
use constant ICAP_SERVICE_NOT_FOUND => 404; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
813
|
|
77
|
4
|
|
|
4
|
|
21
|
use constant ICAP_METHOD_NOT_ALLOWED => 405; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
185
|
|
78
|
4
|
|
|
4
|
|
19
|
use constant ICAP_AUTH_REQUIRED => 407; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
135
|
|
79
|
4
|
|
|
4
|
|
17
|
use constant ICAP_REQUEST_TIMEOUT => 408; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
122
|
|
80
|
4
|
|
|
4
|
|
19
|
use constant ICAP_LENGTH_REQUIRED => 411; |
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
132
|
|
81
|
4
|
|
|
4
|
|
18
|
use constant ICAP_URI_TOO_LARGE => 414; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
124
|
|
82
|
4
|
|
|
4
|
|
22
|
use constant ICAP_BAD_COMPOSTION => 418; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
169
|
|
83
|
4
|
|
|
4
|
|
23
|
use constant ICAP_SERVER_ERROR => 500; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
145
|
|
84
|
4
|
|
|
4
|
|
23
|
use constant ICAP_METHOD_NOT_IMPLEMENTED => 501; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
155
|
|
85
|
4
|
|
|
4
|
|
21
|
use constant ICAP_BAD_GATEWAY => 502; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
139
|
|
86
|
4
|
|
|
4
|
|
20
|
use constant ICAP_SERVICE_OVERLOADED => 503; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
140
|
|
87
|
4
|
|
|
4
|
|
21
|
use constant ICAP_GATEWAY_TIMEOUT => 504; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
155
|
|
88
|
4
|
|
|
4
|
|
23
|
use constant ICAP_VERSION_NOT_SUPPORTED => 505; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
190
|
|
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
##################################################################### |
91
|
|
|
|
|
|
|
# |
92
|
|
|
|
|
|
|
# Net::ICAP::Common code follows |
93
|
|
|
|
|
|
|
# |
94
|
|
|
|
|
|
|
##################################################################### |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
1; |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
__END__ |