line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mail::DKIM::Canonicalization::nowsp; |
2
|
14
|
|
|
14
|
|
101
|
use strict; |
|
14
|
|
|
|
|
38
|
|
|
14
|
|
|
|
|
506
|
|
3
|
14
|
|
|
14
|
|
76
|
use warnings; |
|
14
|
|
|
|
|
47
|
|
|
14
|
|
|
|
|
634
|
|
4
|
|
|
|
|
|
|
our $VERSION = '1.20230630'; # 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
|
|
112
|
use base 'Mail::DKIM::Canonicalization::DkimCommon'; |
|
14
|
|
|
|
|
35
|
|
|
14
|
|
|
|
|
6423
|
|
14
|
14
|
|
|
14
|
|
110
|
use Carp; |
|
14
|
|
|
|
|
47
|
|
|
14
|
|
|
|
|
3730
|
|
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__ |