line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Plack::Middleware::RearrangeHeaders; |
2
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
31
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
51
|
use parent qw( Plack::Middleware ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
10
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
595
|
use HTTP::Headers; |
|
1
|
|
|
|
|
4150
|
|
|
1
|
|
|
|
|
143
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub call { |
9
|
1
|
|
|
1
|
1
|
2
|
my $self = shift; |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
|
|
7
|
my $res = $self->app->(@_); |
12
|
|
|
|
|
|
|
$self->response_cb($res, sub { |
13
|
1
|
|
|
1
|
|
3
|
my $res = shift; |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
|
|
1
|
my $h = HTTP::Headers->new(@{$res->[1]}); |
|
1
|
|
|
|
|
4
|
|
16
|
1
|
|
|
|
|
114
|
my @new_headers; |
17
|
1
|
|
|
|
|
7
|
$h->scan(sub { push @new_headers, @_ }); |
|
3
|
|
|
|
|
43
|
|
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
10
|
$res->[1] = \@new_headers; |
20
|
1
|
|
|
|
|
14
|
}); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |