line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Regexp::Common::URI::http; |
2
|
|
|
|
|
|
|
|
3
|
71
|
|
|
71
|
|
238
|
use Regexp::Common qw /pattern clean no_defaults/; |
|
71
|
|
|
|
|
74
|
|
|
71
|
|
|
|
|
308
|
|
4
|
71
|
|
|
71
|
|
257
|
use Regexp::Common::URI qw /register_uri/; |
|
71
|
|
|
|
|
81
|
|
|
71
|
|
|
|
|
2611
|
|
5
|
71
|
|
|
71
|
|
234
|
use Regexp::Common::URI::RFC2396 qw /$host $port $path_segments $query/; |
|
71
|
|
|
|
|
67
|
|
|
71
|
|
|
|
|
5554
|
|
6
|
|
|
|
|
|
|
|
7
|
71
|
|
|
71
|
|
247
|
use strict; |
|
71
|
|
|
|
|
73
|
|
|
71
|
|
|
|
|
1093
|
|
8
|
71
|
|
|
71
|
|
191
|
use warnings; |
|
71
|
|
|
|
|
71
|
|
|
71
|
|
|
|
|
1552
|
|
9
|
|
|
|
|
|
|
|
10
|
71
|
|
|
71
|
|
203
|
use vars qw /$VERSION/; |
|
71
|
|
|
|
|
79
|
|
|
71
|
|
|
|
|
10159
|
|
11
|
|
|
|
|
|
|
$VERSION = '2016060801'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my $http_uri = "(?k:(?k:http)://(?k:$host)(?::(?k:$port))?" . |
15
|
|
|
|
|
|
|
"(?k:/(?k:(?k:$path_segments)(?:[?](?k:$query))?))?)"; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $https_uri = $http_uri; $https_uri =~ s/http/https?/; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
register_uri HTTP => $https_uri; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
pattern name => [qw (URI HTTP), "-scheme=http"], |
22
|
|
|
|
|
|
|
create => sub { |
23
|
|
|
|
|
|
|
my $scheme = $_ [1] -> {-scheme}; |
24
|
|
|
|
|
|
|
my $uri = $http_uri; |
25
|
|
|
|
|
|
|
$uri =~ s/http/$scheme/; |
26
|
|
|
|
|
|
|
$uri; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |