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