line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Plack::Middleware::RearrangeHeaders; |
2
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
4
|
1
|
|
|
1
|
|
35
|
use parent qw( Plack::Middleware ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
8
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
483
|
use HTTP::Headers; |
|
1
|
|
|
|
|
3473
|
|
|
1
|
|
|
|
|
116
|
|
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
|
|
2
|
my $res = shift; |
14
|
|
|
|
|
|
|
|
15
|
1
|
|
|
|
|
1
|
my $h = HTTP::Headers->new(@{$res->[1]}); |
|
1
|
|
|
|
|
3
|
|
16
|
1
|
|
|
|
|
98
|
my @new_headers; |
17
|
1
|
|
|
|
|
6
|
$h->scan(sub { push @new_headers, @_ }); |
|
3
|
|
|
|
|
36
|
|
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
|
|
8
|
$res->[1] = \@new_headers; |
20
|
1
|
|
|
|
|
9
|
}); |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
__END__ |