Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(6)

Unified Diff: Lib/email/policy.py

Issue 10839: email module should not allow some header field repetitions
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/email/_policybase.py ('k') | Lib/test/test_email/test_message.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/email/policy.py
+++ b/Lib/email/policy.py
@@ -109,6 +109,13 @@
"or carriage return characters")
return (name, self.header_factory(name, value))
+ def header_max_count(self, name):
+ """+
+ Returns the max_count attribute from the specialized header class
+ that would be used to construct a header of type 'name'.
+ """
+ return self.header_factory[name].max_count
+
def header_fetch_parse(self, name, value):
"""+
If the value has a 'name' attribute, it is returned to unmodified.
« no previous file with comments | « Lib/email/_policybase.py ('k') | Lib/test/test_email/test_message.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+