line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::DKIM::Canonicalization::nowsp; |
2
|
14
|
|
|
14
|
|
97
|
use strict; |
|
14
|
|
|
|
|
37
|
|
|
14
|
|
|
|
|
454
|
|
3
|
14
|
|
|
14
|
|
98
|
use warnings; |
|
14
|
|
|
|
|
31
|
|
|
14
|
|
|
|
|
637
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.20230212'; # VERSION |
5
|
|
|
|
|
|
|
# ABSTRACT: nowsp canonicalization |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# Copyright 2005 Messiah College. All rights reserved. |
8
|
|
|
|
|
|
|
# Jason Long |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or |
11
|
|
|
|
|
|
|
# modify it under the same terms as Perl itself. |
12
|
|
|
|
|
|
|
|
13
|
14
|
|
|
14
|
|
113
|
use base 'Mail::DKIM::Canonicalization::DkimCommon'; |
|
14
|
|
|
|
|
34
|
|
|
14
|
|
|
|
|
6365
|
|
14
|
14
|
|
|
14
|
|
104
|
use Carp; |
|
14
|
|
|
|
|
42
|
|
|
14
|
|
|
|
|
3908
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub canonicalize_header { |
17
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
18
|
0
|
0
|
|
|
|
|
croak 'wrong number of parameters' unless ( @_ == 1 ); |
19
|
0
|
|
|
|
|
|
my ($line) = @_; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# remove all whitespace |
22
|
0
|
|
|
|
|
|
$line =~ s/[ \t\015\012]//g; |
23
|
|
|
|
|
|
|
|
24
|
0
|
0
|
|
|
|
|
if ( $line =~ /^([^:]+):(.*)$/ ) { |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# lowercase field name |
27
|
0
|
|
|
|
|
|
$line = lc($1) . ":$2"; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return $line; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub canonicalize_body { |
34
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
35
|
0
|
|
|
|
|
|
my ($multiline) = @_; |
36
|
|
|
|
|
|
|
|
37
|
0
|
|
|
|
|
|
$multiline =~ s/[ \t\015\012]//g; |
38
|
0
|
|
|
|
|
|
return $multiline; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub finish_body { |
42
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
43
|
0
|
|
|
|
|
|
$self->SUPER::finish_body; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__END__ |