Skip to content

Commit 2550011

Browse files
committed
Move the validate_header_name up
1 parent 8233e92 commit 2550011

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/email/policy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ def header_store_parse(self, name, value):
144144
CR or LF characters.
145145
146146
"""
147+
validate_header_name(name)
147148
if hasattr(value, 'name') and value.name.lower() == name.lower():
148149
return (name, value)
149-
validate_header_name(name)
150150
if isinstance(value, str) and len(value.splitlines())>1:
151151
# XXX this error message isn't quite right when we use splitlines
152152
# (see issue 22233), but I'm not sure what should happen here.

0 commit comments

Comments
 (0)