From 5da23e5856e15a6cdd996c72f952b4bb9cbaea99 Mon Sep 17 00:00:00 2001 From: William Grant Date: Fri, 3 Jun 2011 22:03:41 +1000 Subject: [PATCH] rstrip header field names in relaxed, as the spec says. --- dkim/canonicalization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dkim/canonicalization.py b/dkim/canonicalization.py index 0f81f9e..d474921 100644 --- a/dkim/canonicalization.py +++ b/dkim/canonicalization.py @@ -66,7 +66,7 @@ class Relaxed: # Compress WSP to single space. # Remove all WSP at the start or end of the field value (strip). return [ - (x[0].lower(), + (x[0].lower().rstrip(), compress_whitespace(unfold_header_value(x[1])).strip() + b"\r\n") for x in headers]