Skip to content

Commit ccb2f9f

Browse files
Hui Caoemersion
authored andcommitted
Fix dkim verification issues and dmarc alignment default
Change-Id: Id23c3a5f168214f441268e582d6448ab57defa12
1 parent 2470a25 commit ccb2f9f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dkim/canonical.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import (
66
"strings"
77
)
88

9+
var rxReduceWS = regexp.MustCompile(`[ \t\r\n]+`)
10+
911
// Canonicalization is a canonicalization algorithm.
1012
type Canonicalization string
1113

@@ -105,7 +107,6 @@ func (c *relaxedCanonicalizer) CanonicalizeHeader(s string) string {
105107

106108
var v string
107109
if len(kv) > 1 {
108-
rxReduceWS := regexp.MustCompile(`[ \t\r\n]+`)
109110
v = rxReduceWS.ReplaceAllString(kv[1], " ")
110111
v = strings.TrimSpace(v)
111112

0 commit comments

Comments
 (0)