(self, name, value)
| 296 | mangle_from_ = True |
| 297 | |
| 298 | def _sanitize_header(self, name, value): |
| 299 | # If the header value contains surrogates, return a Header using |
| 300 | # the unknown-8bit charset to encode the bytes as encoded words. |
| 301 | if not isinstance(value, str): |
| 302 | # Assume it is already a header object |
| 303 | return value |
| 304 | if _has_surrogates(value): |
| 305 | return header.Header(value, charset=_charset.UNKNOWN8BIT, |
| 306 | header_name=name) |
| 307 | else: |
| 308 | return value |
| 309 | |
| 310 | def header_source_parse(self, sourcelines): |
| 311 | """+ |
no test coverage detected