line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Tools::HTTP::UA::Mojo::Proxy; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
52
|
|
4
|
2
|
|
|
2
|
|
7
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
75
|
|
5
|
2
|
|
|
2
|
|
9
|
use Mojo::Base 'Mojo::UserAgent::Proxy'; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
12
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: Proxy class for Test2::Tools::HTTP::UA::Mojo |
8
|
|
|
|
|
|
|
our $VERSION = '0.03'; # VERSION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
has 'apps'; |
12
|
|
|
|
|
|
|
has 'apps_proxy_url'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub prepare |
15
|
|
|
|
|
|
|
{ |
16
|
17
|
|
|
17
|
1
|
13011
|
my ($self, $tx) = @_; |
17
|
|
|
|
|
|
|
|
18
|
17
|
100
|
|
|
|
53
|
if($self->apps->uri_to_app($tx->req->url."")) |
19
|
|
|
|
|
|
|
{ |
20
|
2
|
|
|
|
|
613
|
$tx->req->proxy($self->apps_proxy_url); |
21
|
2
|
|
|
|
|
25
|
return; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
else |
24
|
|
|
|
|
|
|
{ |
25
|
15
|
|
|
|
|
6167
|
return $self->SUPER::prepare($tx); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |