(self, name, value)
| 287 | mangle_from_ = True |
| 288 | |
| 289 | def _sanitize_header(self, name, value): |
| 290 | # If the header value contains surrogates, return a Header using |
| 291 | # the unknown-8bit charset to encode the bytes as encoded words. |
| 292 | if not isinstance(value, str): |
| 293 | # Assume it is already a header object |
| 294 | return value |
| 295 | if _has_surrogates(value): |
| 296 | return header.Header(value, charset=_charset.UNKNOWN8BIT, |
| 297 | header_name=name) |
| 298 | else: |
| 299 | return value |
| 300 | |
| 301 | def header_source_parse(self, sourcelines): |
| 302 | """+ |
no test coverage detected