line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OpenID::Lite::RelyingParty::Discover::Fetcher::HTML; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
11
|
use Any::Moose; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
13
|
|
4
|
|
|
|
|
|
|
with 'OpenID::Lite::Role::AgentHandler'; |
5
|
|
|
|
|
|
|
with 'OpenID::Lite::Role::ErrorHandler'; |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
1600
|
use OpenID::Lite::RelyingParty::Discover::FetchResult; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
133
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub fetch { |
10
|
0
|
|
|
0
|
0
|
|
my ( $self, $uri ) = @_; |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
|
|
|
my $res = $self->agent->get($uri); |
13
|
0
|
0
|
|
|
|
|
return $self->ERROR( |
14
|
|
|
|
|
|
|
sprintf q{Failed to HTML based discovery for url "%s"}, $uri ) |
15
|
|
|
|
|
|
|
unless $res->is_success; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
my $result = OpenID::Lite::RelyingParty::Discover::FetchResult->new; |
18
|
0
|
|
|
|
|
|
$result->final_url( $res->base->as_string ); |
19
|
0
|
|
|
|
|
|
$result->normalized_identifier( $uri ); |
20
|
0
|
|
|
|
|
|
$result->content_type( lc $res->header('Content-Type') ); |
21
|
0
|
|
|
|
|
|
$result->content( $res->content ); |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
return $result; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
2
|
|
155
|
no Any::Moose; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
9
|
|
27
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
28
|
|
|
|
|
|
|
1; |
29
|
|
|
|
|
|
|
|